Used to register a function that will be called when an attribute is being validated.
class User extends Model { @Attribute(DataTypes.STRING) @ValidateAttribute({ myCustomValidator: () => { // this function will run when this attribute is validated. }, }) declare name: string;} Copy
class User extends Model { @Attribute(DataTypes.STRING) @ValidateAttribute({ myCustomValidator: () => { // this function will run when this attribute is validated. }, }) declare name: string;}
See also ModelValidator.
Used to register a function that will be called when an attribute is being validated.