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
@ -60,4 +60,4 @@ p
.fieldlabel
' We need your current password to confirm all of these changes
= submit "Save Account", class: "button"
= submit "Save Account", class: "button"

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
@ -47,4 +47,4 @@ h1 Register
br
= submit "Sign Up", class: "button"
= submit "Sign Up", class: "button"

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