new Tree(name)
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string |
- Source:
Extends
Members
-
description
-
Sets the description
- Inherited From:
- Source:
Methods
-
always() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
children() → {Context}
-
Gets the child context
- Inherited From:
- Source:
Returns:
- Type
- Context
-
defaultValue(value) → {MixedNode}
-
Defines the default value for this entity
Parameters:
Name Type Description valuemixed - Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
deploy(data) → {object}
-
Parameters:
Name Type Description dataobject - Source:
Returns:
- Type
- object
-
end() → {MixedNode}
-
Returns the parent context
- Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
ifArray() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
ifInArray() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
ifNotInArray() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
ifNull() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
ifString() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
ifTrue() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
isRequired() → {MixedNode}
-
Mark this entity as required
- Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
sanitizer(callback) → {MixedNode}
-
Setup a sanitizer function
Parameters:
Name Type Description callbackfunction - Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
validator(callback) → {MixedNode}
-
Sets the validator function
Parameters:
Name Type Description callbackfunction - Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
validatorIf(condition, validator) → {MixedNode}
-
Sets a conditional validator
Parameters:
Name Type Description conditionfunction validatorfunction - Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
when(condition) → {Condition}
-
Parameters:
Name Type Description conditionfunction - Inherited From:
- Source:
Returns:
- Type
- Condition