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
Optionalpath: stringThe field that triggered the validation error
Optionalvalue: stringThe value that generated the error
Optionalinstance: Model<any, any>the DAO instance that caused the validation error
OptionalvalidatorKey: stringa validation "key", used for identification
OptionalfnName: stringproperty name of the BUILT-IN validator function that caused the validation error (e.g. "in" or "len"), if applicable
OptionalfnArgs: unknown[]parameters used with the BUILT-IN validator function, if applicable
The DAO instance that caused the validation error
ReadonlyoriginThe field that triggered the validation error
ReadonlytypeThe type/origin of the validation error
ReadonlyvalidatorParameters 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
StaticOriginsStaticTypereturn 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
OptionaluseTypeAsNS: truecontrols whether the returned value is "namespace",
this parameter is ignored if the validator's type is not one of ValidationErrorItem.Origins
OptionalNSSeparator: stringa separator string for concatenating the namespace, must be not be empty, defaults to "." (fullstop). only used and validated if useTypeAsNS is TRUE.
Staticthrow
Validation Error Item Instances of this class are included in the
ValidationError.errorsproperty.