new FunctionNode(key, parent)
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | |
parent |
MixedNode |
- Source:
Extends
Members
-
description
-
Sets the description
- Inherited From:
- Source:
Methods
-
always() → {Condition}
-
- Inherited From:
- Source:
Returns:
- Type
- Condition
-
defaultValue(value) → {MixedNode}
-
Defines the default value for this entity
Parameters:
Name Type Description valuemixed - Inherited From:
- Source:
Returns:
- Type
- MixedNode
-
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