form validation not showing errors

24 views
Skip to first unread message

Shaban K.

unread,
Oct 14, 2012, 4:31:00 AM10/14/12
to rubyonra...@googlegroups.com
Hi I have a simple form where the user can sign up with an email and
password and click the create button but when this is done no action
happens and even when I fill in the form blank no error messages
are shown .What could be the issue in my code?

Attachments:
http://www.ruby-forum.com/attachment/7801/_form.html.erb
http://www.ruby-forum.com/attachment/7802/new.html.erb
http://www.ruby-forum.com/attachment/7803/_error_messages.html.erb
http://www.ruby-forum.com/attachment/7804/users_controller.rb
http://www.ruby-forum.com/attachment/7805/user.rb


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

Colin Law

unread,
Oct 14, 2012, 4:36:29 AM10/14/12
to rubyonra...@googlegroups.com
On 14 October 2012 09:31, Shaban K. <li...@ruby-forum.com> wrote:
> Hi I have a simple form where the user can sign up with an email and
> password and click the create button but when this is done no action
> happens and even when I fill in the form blank no error messages
> are shown .What could be the issue in my code?

Have a look at the Rails Guide on debugging, that will give you ideas
on how to debug the code and work out what is going wrong.

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 rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Avi

unread,
Oct 14, 2012, 11:58:59 AM10/14/12
to rubyonra...@googlegroups.com
On your _form.html.erb, you have to use as :-
<%= form_for (@user, :validate => true) do |f|%>
Try this.... :validates => true triggers validations.

Hope this helps....
Reply all
Reply to author
Forward
0 new messages