Hi
I am trying to validate multiple inputs on signup i.e. email and custom_field.
The EmailValidator only seems to have aceess to the email record.
I would like to extend it to allow me to access the custom_field too.
It seems odd to me that the PasswordValidator has access to all the records (email, username, name, password, etc), whereas the EmailValidator does not.
From PasswordValidator I can do the following
def validate_each(record, attribute, value)
my_custom_field = record.user_fields["1"]
end
Unfortunately, I cannot access multple user records from the EmailValidator
EmailValidator cannot do the following
def validate_each(record, attribute, value)
my_custom_field = record.user_fields["1"] # DOESN'T WORK
end
Could someone please point me in the right direction?
Thank you