Validates_format_of :zipcode


#1

how can I set the validation of the zipcode ?


#2

you’ll want to try a regexp. look here for the code

http://regexlib.com/DisplayPatterns.aspx?cattabindex=6&categoryId=7

it’s in there somewhere…
hope this helps