title: validates length of problem
body: <p>My problem is: the code below works fine but there is one special case. If item's product_id is 1 then item can have up to 10 keywords. Any help will be appreciated.Thanks</p>
  
  <pre><code>class Item &lt; ActiveRecord::Base
  
  validates_length_of :keywords, :maximum =&gt; 5,  :tokenizer =&gt; lambda {|str| str.scan(/\w+/) }, :on =&gt; :update 
  
  end
  </code></pre>