Ruby on Rails Tuesday, June 26, 2012

Hi,

I have a form with 2 attributes/fields. As im not storing them in a
database, i have used activemodel::validations for validations in my
model class.

In the views file i have 2 associated text fields (part of a form) with
a submit button. I have used validates_presence_of for the 2 attributes,
but i dont see an error even when i click the submit button with empty
fields.
How do i validate stuff in the form?

--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment