Precising error: in Readme
This commit is contained in:
parent
43dccaf1cc
commit
cbca850eeb
|
@ -100,12 +100,12 @@ To start using **Simple Form** you just have to use the helper it provides:
|
|||
This will generate an entire form with labels for user name and password as well, and render errors
|
||||
by default when you render the form with invalid data (after submitting for example).
|
||||
|
||||
You can overwrite the default label by passing it to the input method. You can also add a hint or
|
||||
You can overwrite the default label and error by passing them to the input method. You can also add a hint or
|
||||
even a placeholder. For boolean inputs, you can add an inline label as well:
|
||||
|
||||
```erb
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<%= f.input :username, label: 'Your username please' %>
|
||||
<%= f.input :username, label: 'Your username please', error: 'Username is mandatory, please specify one' %>
|
||||
<%= f.input :password, hint: 'No special characters.' %>
|
||||
<%= f.input :email, placeholder: 'user@domain.com' %>
|
||||
<%= f.input :remember_me, inline_label: 'Yes, remember me' %>
|
||||
|
|
Loading…
Reference in New Issue