Methods
# static 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
# static getRegistry()
Returns the current ValidatorRegistry
IValidatorRegistry, defaults to ValidatorRegistry
# static key(key)
Builds the key to store as Metadata under Reflections
concatenates ValidationKeys#REFLECT
with the provided key
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
# static register(validator) → {void}
Registers the provided validators onto the registry
Parameters:
Name | Type | Description |
---|---|---|
validator |
Array.<T>
|
Array.<ValidatorDefinition>
|
void
# static setRegistry(validatorRegistry, migrationHandleropt)
Defines the acting ValidatorRegistry
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
validatorRegistry |
IValidatorRegistry
|
the new implementation of the validator Registry |
|
migrationHandler |
function
|
<optional> |
the method to map the validator if required; |