Hi Allan,
I have a table in which I want to perform a conditional validation based on another field value in the same row. In this table are two fields users.student_number and users.role.
Field::inst('users.student_number')
->validator('Validate::unique')
->validator('Validate::notEmpty'),
This is the validation I want if users.role is student, but if users.role is teacher, etc., then I do not want to validate this field.
I have been attempting custom validators and the use of functions but I cannot seem to figure out how to use your built in validators at the same time. Is this possible?
Thanks for all of your help in the past,
Bo