I am trying to validate the email format by using “validates_format_of”.
I have written a code like this:-
:message => “is not valid” "
It is working fine, but in my application email id is not manadatory.
So how should add the condition in this validator so that it will
validate the email only when the email address is present.
Can anyone help me out?