Creates a new ValidationError item. Instances of this class are included in the ValidationError.errors
property.
An error message
The type/origin of the validation error
Optional
path: stringThe field that triggered the validation error
Optional
value: stringThe value that generated the error
Optional
instance: Model<any, any>the DAO instance that caused the validation error
Optional
validatorKey: stringa validation "key", used for identification
Optional
fnName: stringproperty name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable
Optional
fnArgs: unknown[]parameters used with the BUILT-IN validator function, if applicable
The DAO instance that caused the validation error
Readonly
originThe field that triggered the validation error
Readonly
typeThe type/origin of the validation error
Readonly
validatorParameters used with the BUILT-IN validator function, if applicable
A validation "key", used for identification
Property name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable
The value that generated the error
Static
OriginsWill be removed in v7
Static
TypeWill be removed in v7
return a lowercase, trimmed string "key" that identifies the validator.
Note: the string will be empty if the instance has neither a valid validatorKey
property nor a valid validatorName
property
controls whether the returned value is "namespace",
this parameter is ignored if the validator's type
is not one of ValidationErrorItem.Origins
thrown if NSSeparator is found to be invalid.
Optional
useTypeAsNS: truecontrols whether the returned value is "namespace",
this parameter is ignored if the validator's type
is not one of ValidationErrorItem.Origins
Optional
NSSeparator: stringa separator string for concatenating the namespace, must be not be empty, defaults to "." (fullstop). only used and validated if useTypeAsNS is TRUE.
Private
isStatic
throw
Validation Error Item Instances of this class are included in the
ValidationError.errors
property.