Using Devise with Rails 4
I would like my email_field to have a red border until the user inputs an email in a valid format, then it would change to green.
I am having trouble finding documentation on doing this so if you can recommend the best way to go about this, that would be awesome.
My current view:
<div class="form-group">
<%= f.email_field :email, placeholder: 'Email', :autofocus => true, class: 'form-control' %>
</div>
user.rb:
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :omniauthable
and if there is already documentation on this, can you please point me in that direction. Thank you!