search for: too_long

Displaying 6 results from an estimated 6 matches for "too_long".

Did you mean: foo_long
2006 Jul 16
0
Problems with validates_lenght_of
...:first_name, :last_name validates_confirmation_of :password validates_presence_of :password, :password_confirmation, :login, :email, :on => :create validates_length_of :password, :within => 6..20, :too_long => "must be shorter", :too_short => "must be longer", :on => :create validates_length_of :password, :within => 6..20, :too_long => "must be shorter",...
2012 Aug 14
3
validates_format_of :message not working, validates_length_of :message is working
...sage to be displayed if the data is invalid: validates_format_of :mobile, :with => /\A[\+0-9]+\Z/, :message => " - Wrong" I have another validation some where else that does display the error message: " - Name is too long" validates_length_of :name, :within => 5..40, :too_long => " - Name is too long", validates_length_of :name, :within => 1..50, :message => "Broken" *<------ This also works but not for validates_format_of* Any ideas? Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on...
2011 Apr 18
2
acts_as_commentable validations
...comment.rb file generated by acts_as_commentable to limit the comment length: [code] validates_length_of :comment, :minimum => 3, :too_short => "must be at least {{count}} words.", :tokenizer => lambda {|str| str.scan(/\w+/) } validates_length_of :comment, :maximum => 200, :too_long => "must be shorter than {{count}} words. Make sure there are no links or elements.", :tokenizer => lambda {|str| str.scan(/\w+/) } [/code] The show view form for the comment is the following: [code] <%- form_for [@post, @comment] do |f|-%> <%= f.error_messages %>...
2006 Mar 16
0
validating presence of a tag
...nce_of :question_text, :message=>"must not be blank." validates_length_of :question_text, :maximum=>150, :message=>"must be less than 150 characters." end Class Tag < ActiveRecord Base validates_presence_of :name validates_length_of :name, :in => 1..20, :too_long => "Tag name too long - max 20 characters", :too_short => "Tag must have a name" end Suggestions are appreciated. Steve http://www.smarkets.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/...
2006 Mar 17
0
validations using acts_as_taggable
Can anyone provide me an example of how they are displaying validation errors when saving a tag using Demetrius''s (not DHH''s) act_as_taggable plugin? For example, the tag model has a :validates_length_of :name, :in => 1..30, :too_long => "Tag name too long - max 30 characters", :too_short => "Tag must have a name" If a user inputs a tag longer than 30 characters, how are you displaying the error_messages_on :tag messages? Thanks, Steve http://www.smarkets.net -------------- next part -------------- A...
2005 Jan 17
5
how to override rails errors messages?
hi, how can i override rails errors mesages (that are in english) to display them in an other language? thanks hangon