<input> with attribute required
This attribute specifies that the user must fill in a value before submitting a form. It cannot be used when the type attribute is hidden, image, or a button type (submit, reset, or button). The :optional and :required CSS pseudo-classes will be applied to the field as appropriate.
How to show a spinner only when the required validations pass? (Without using any validation plugin, only the required attribute).
Form with a required input
= form_for @person, remote: true do |f|
= f.text_field, :first_name, required: true