Class

Validator

Validator(name, errorMessageopt)

Constructor

# new Validator(name, errorMessageopt)

Parameters:
Name Type Attributes Default Description
name string

validator name. Should match the type -> subtype of the field

errorMessage string <optional>
Child classes must implement this

should always have a default message

View Source model/Validations.js, line 185

Methods

# hasErrors(value, …argsopt) → {string|undefined}

returns the error message, or nothing if is valid

.

returns the error message, or nothing if is valid

Parameters:
Name Type Attributes Description
value

the value

args <optional>
<repeatable>

optional others args

View Source model/Validations.js, line 195

errors or nothing

string | undefined