Class: Tree

Tree

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
value mixed
Inherited From:
Source:
Returns:
Type
MixedNode

deploy(data) → {object}

Parameters:
Name Type Description
data object
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
callback function
Inherited From:
Source:
Returns:
Type
MixedNode

validator(callback) → {MixedNode}

Sets the validator function

Parameters:
Name Type Description
callback function
Inherited From:
Source:
Returns:
Type
MixedNode

validatorIf(condition, validator) → {MixedNode}

Sets a conditional validator

Parameters:
Name Type Description
condition function
validator function
Inherited From:
Source:
Returns:
Type
MixedNode

when(condition) → {Condition}

Parameters:
Name Type Description
condition function
Inherited From:
Source:
Returns:
Type
Condition