title: Validates_format_of?
body: <pre><code>1 error prohibited this {{model}} from being saved
  
    There were problems with the following fields:
  
      * {{attribute}} {{message}}
  </code></pre>
  
  <p>I am getting this error and code I am using is:</p>
  
  <pre><code>validates_format_of :user_id , :with =&gt; /\A(([0-9]{4})-[A-Z]{2}$)\Z/ , :message =&gt; "should be in the format 1111-TT", :allow_nil =&gt; true, :allow_blank =&gt; true
  </code></pre>
  
  <p>Any idea what's causing this?</p>