Forum

Thread tagged as: Problem, Forms

Form invalid email format not catching

I'm building a contact form. Thus far everything is working fine except invalid email formats are not being caught. The "required" error works but not the "format"

<perch:form id="contact" method="post" app="perch_forms" novalidate="novalidate">

     <perch:input class="short-field" id="email" type="text" required="true" placeholder="Email *" />

     <perch:error for="email" type="required"><p class="error-field">&centerdot; Enter Email</p></perch:error>
     <perch:error for="email" type="format"><p class="error-field">&centerdot; Valid Email</p></perch:error>

     <perch:input class="button" type="submit" id="submit" value="Send" />

</perch:form>

Many thanks for any suggestions

Nicholas Nelson

Nicholas Nelson 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You are using type="text"

If you want it to be validated as an email field you need to use type="email".

Haha great. It was a late one.