Validation Decorator Function Name.
The default error message function
An instance of the class that has been decorated.
Property of the object to be validated.
Whether validation should continue
in the event of an error. For example
is a value is undefined
,
then there's little point
applying the other validators.
Whether validation should continue in the event of an error.
For example is a value is undefined, then there's little point in applying the other validators.
Constructor function of the instance being validated.
Function that performs the validation of properties containing arrays.
Function that performs the validation of single values.
Validation options.
Validation constraint parameters for the validation.
Validation options specific to the type of validation being performd.
The signature for the decorator, class, and class property combination.
Below is a getSignature example of what would be produced
when the ValidationContext were formed from the
IfValid annotation applied to the purchasePrice
property of a SalesOrder
instance.
IfValid_SalesOrder_purchasePrice
Generated using TypeDoc
The
ValidationContext
instance for a certain annotation and property combination is created when the run time loads the class that has been annotated.Example
We have a
name
property decorated with the theIsAlpha
annotation like this:When that annotation runs it creates a
ValidationContext
instance with the signatureIsAlpha_Person_name
that is specific to thePerson
class and thename
property.The
ValidationContext
instance is initialized with the parameters necessary to perform anIsAlpha
validation on thename
property of aPerson
instance.