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