PRIVATE

Show:
_handlePromise () private

Promise handler

_overrideResult
(
  • result
)
private

Override the internal _result property.

Parameters:

update
(
  • value
)
private

Update the current validation result object with the given value

  • If value is undefined or null, set isValid to false
  • If value is a validations object from a different model/object, set the _result object to the one given (belongs-to)
  • If value is a collection of result objects, create a Validation Result Collection and set that to the _result object (has-many)
  • If value is a string, set the message to the given string and set isValid to false
  • If value is a boolean, set isValid to result
  • If value is a pojo, update _result object with the information given

Parameters:

_isReadOnly

Boolean private

Determines if the _result object is readOnly.

This is needed because ResultCollections and global validation objects control their own state via CPs

_promise

Promise private

_result

Result private

This hold all the logic for the above CPs. We do this so we can easily switch this object out with a different validations object

_validator

Validator private

The validator that returned this result

attribute

String

isInvalid

Boolean

isTruelyInvalid

Boolean

isTruelyValid

Boolean

isValidating

Boolean

isWarning

Boolean

messages

Array

warningMessage

String

warningMessages

Array

warnings

Array