Defines the methods that objects that participate in a validation operation.
Methods
-
<static> Validator#supports(value)
-
Indicates if the validator supports the passed-in value.
Parameters:
Name Type Description value
* The value to evaluate.
Returns:
true
if the specific value is valid. -
<static> Validator#validate(value)
-
Evaluates the specified value and throw an
Error
if the value is not valid.Parameters:
Name Type Description value
* The value to evaluate.
Throws:
Error
if the value is not valid.