Constructor
# new ValidatorRegistry()
Base Implementation of a Validator Registry
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
validators |
Array.<Validator>
|
<optional> |
the initial validators to register |
- Implements:
View Source validation/Validators/ValidatorRegistry.ts, line 3
Methods
# get(validatorKey) → {Validator|undefined}
Retrieves a validator
Parameters:
| Name | Type | Description |
|---|---|---|
validatorKey |
string
|
one of the |
the registered Validator or undefined if there is nono matching the provided key
Validator
|
undefined
# register(validator) → {void}
Registers the provided validators onto the registry
Parameters:
| Name | Type | Description |
|---|---|---|
validator |
Array.<T>
|
Array.<ValidatorDefinition>
|
void