Forum
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">· Enter Email</p></perch:error>
<perch:error for="email" type="format"><p class="error-field">· Valid Email</p></perch:error>
<perch:input class="button" type="submit" id="submit" value="Send" />
</perch:form>
Many thanks for any suggestions
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.