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