Documentation
    Preparing search index...

    Variable ValidateAttributeConst

    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;
    }

    See also ModelValidator.