StateModel

Classes

StateModel

Members

(inner) fields :Object.<string, (String|Array|function())>

Represents the actual properties that will be tested.

Source:
Type:
  • Object.<string, (String|Array|function())>

(inner, readonly) shallow :Boolean

Shallow property determines the StateModel Instance behaviour concerning field validation when a

Source:
Type:
  • Boolean

Methods

(inner) checkValid(prop, value, fieldsopt) → {Boolean}

Indicates if the tested value passes model validation.

Source:
Parameters:
Name Type Attributes Description
prop String
value any
fields Object.<string, any> <optional>
Returns:
Type:
Boolean

(inner) destroyFields()

Drop model fields. Cancel validation at the same time.

Source:

(inner) setField(field, value)

Set fields property.

Source:
Parameters:
Name Type Description
field String
value String | Array | function

(inner) toggleShallow()

Toggle shallow property.

Source:

(inner) unsetField(field)

Unset model property.

Source:
Parameters:
Name Type Description
field String