Constrains numbers to an enumerated domain.
Checks the value against the admitted set.
The admitted values, or undefined to accept any value
A validator reporting a violation if the value is outside values
Constrains strings to an enumerated domain.
Checks the value against the admitted set.
The admitted values, or undefined to accept any value
A validator reporting a violation if the value is outside values
Constrains numbers and strings to an enumerated domain.