PRIVATE
Methods
_overrideResult
(
private
-
result
Override the internal _result property.
Parameters:
-
result
Object
update
(
private
-
value
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:
-
value
Object
_isReadOnly
Boolean privateDetermines if the _result object is readOnly.
This is needed because ResultCollections and global validation objects control their own state via CPs
_result
Result privateThis hold all the logic for the above CPs. We do this so we can easily switch this object out with a different validations object