Hi all,
I have the following line in my model:
validates_format_of :postal_code, :with => /\d{4}\s*[a-zA-Z]{2}/, :on => :create
However this still does allow me to create a postal code such as:
5444 ABC
which is incorrect, because it should only be allowed if two characters are supplied at the end.
In java the same regex is working, what am I doing wrong here?
Regards,
Harm