vendredi 20 mars 2015

Simple_form_for - show validation errors for each field

I have a simple forms which is working well in a sense that it shows the validation error:



<%= simple_form_for( @my_model, :defaults => { :input_html => { :class => "input-xlarge" } }) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<p>
<%= f.text_field :title, :placeholder => t("title") %>
</p>
......


but it just isn't showing which of the fields are invalid. How can I make it do that?


Aucun commentaire:

Enregistrer un commentaire