user557657
user557657

Reputation: 896

Validates_format_of?

1 error prohibited this {{model}} from being saved

  There were problems with the following fields:

    * {{attribute}} {{message}}

I am getting this error and code I am using is:

validates_format_of :user_id , :with => /\A(([0-9]{4})-[A-Z]{2}$)\Z/ , :message => "should be in the format 1111-TT", :allow_nil => true, :allow_blank => true

Any idea what's causing this?

Upvotes: 0

Views: 687

Answers (1)

cam
cam

Reputation: 14222

I had this same problem using Rails 2 and i18n 0.5.0. Uninstall i18n 0.5.0 or specify the older version (I'm using 0.4.1) in your environment.

Upvotes: 1

Related Questions