I’m using validates_format_of and the validation I want to do works, but
can’t get an error message to be displayed if the data is invalid:
validates_format_of :mobile, :with => /\A[+0-9]+\Z/, :message => " -
I have another validation some where else that does display the error
message: " - Name is too long"
validates_length_of :name, :within => 5…40, :too_long => " - Name is
validates_length_of :name, :within => 1…50, :message => “Broken”
This also works but not for validates_format_of