> validates_format_of :zip, :with => /^[0-9]{5}(-[0-9]{4})?$/
Uh, you're trying to use a regular expression on an int? Off the top
of my head that seems unlikely to work...
> No matter whatever valid 5 digit zip I enter, this does not work, but
> If I do a
> '12345'.match (/^[0-9]{5}(-[0-9]{4})?$/) it works just fine!
.. as the above would seem to confirm.
HTH,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan