On 12 November 2010 11:15, Premanshu Mishra <[email protected]> wrote: > Hi Railers, > > I have put a simple validation > > validates_length_of :subject, :maximum => 10, :message => "pick a > shorter subject" > > If i have more than 10 characters in subject, the message is not being > sent; > but on the contrary, when i click on send button it says message sent > successfully(a custom message written in Controller) , but in reality it > is not getting sent. Why my message pick a shorter subject is not > getting reflected.
What do you mean by 'sent'? The validation check is made when the record is saved to the database not when the form is submitted. I think maybe you have an error in the controller code that is receiving the submit. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

