validate that emails look like emails

This commit is contained in:
byte[] 2019-12-30 19:07:02 -05:00
parent a5966ae287
commit 45048d5015
3 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ p
h3 Email address
.field
= text_input f, :email, class: "input", placeholder: "Email", required: true
= text_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ".*@.*"
= error_tag f, :email
h3 Change Password

View file

@ -16,7 +16,7 @@ h1 Register
' You'll use your email address to log in, and we'll use this to get in
' touch if we need to. Don't worry, we won't share this or spam you.
.field
= text_input f, :email, class: "input", placeholder: "Email", required: true
= text_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ".*@.*"
= error_tag f, :email
.fieldlabel

View file

@ -8,7 +8,7 @@ h1 Sign in
p = link "Forgot your password?", to: Routes.pow_reset_password_reset_password_path(@conn, :new)
.field
= text_input f, :email, class: "input", required: true, placeholder: "Email", autofocus: true
= text_input f, :email, class: "input", required: true, placeholder: "Email", autofocus: true, pattern: ".*@.*"
= error_tag f, :email
.field