How can I validate user info under certain conditions? For example, I
just downloaded a plug-in that allows me to validate phone numbers,
but what I would like is to only validate the phone number if it is
not blank and if the user_type_id field is equal to one.
How can I achieve such a validation in my user model?
Thanks. How do I pass arguments to "some_method"? I am concerned if
the :phone_number attribute of the model is not empty and if
the :user_type_id field is equal to 2.