Add required to form fields
This commit is contained in:
parent
3881248603
commit
5116a9d031
|
@ -2,7 +2,7 @@
|
|||
|
||||
<%= form_with model: @game_system, url: do |f| %>
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
<%= f.text_field :name, required: true %>
|
||||
|
||||
<%= f.submit button_text %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
<section class="inset">
|
||||
<%= form_with url: sessions_path do |f| %>
|
||||
<%= f.label :username %>
|
||||
<%= f.text_field :username %>
|
||||
<%= f.text_field :username, required: true %>
|
||||
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password %>
|
||||
<%= f.password_field :password, required: true %>
|
||||
|
||||
<%= f.submit t(".log_in") %>
|
||||
<% end %>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
<%= form_with model: @table do |f| %>
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
<%= f.text_field :name, required: true %>
|
||||
|
||||
<%= f.label :game_system_id %>
|
||||
<%= f.collection_select :game_system_id, GameSystem.all, :id, :name %>
|
||||
<%= f.collection_select :game_system_id, GameSystem.all, :id, :name, required: true %>
|
||||
|
||||
<%= f.submit button_text %>
|
||||
<% end %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<section class="inset">
|
||||
<%= form_with model: user do |f| %>
|
||||
<%= f.label :username %>
|
||||
<%= f.text_field :username %>
|
||||
<%= f.text_field :username, required: true %>
|
||||
|
||||
<%= f.label :first_name %>
|
||||
<%= f.text_field :first_name %>
|
||||
|
@ -12,13 +12,13 @@
|
|||
<%= f.text_field :last_name %>
|
||||
|
||||
<%= f.label :email %>
|
||||
<%= f.text_field :email %>
|
||||
<%= f.text_field :email, required: true %>
|
||||
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password %>
|
||||
<%= f.password_field :password, required: true %>
|
||||
|
||||
<%= f.label :password_confirmation %>
|
||||
<%= f.password_field :password_confirmation %>
|
||||
<%= f.password_field :password_confirmation, required: true %>
|
||||
|
||||
<%= f.submit button_text %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue