Turn off HTML5 validation on registration form

We do our own server-side validation of things like email address. We
don’t want the browser also trying to do it based on the input type of a
form field. It’s bad because the browser validation message comes up as
a nasty little tooltip under the field.
This commit is contained in:
Chris Hill-Scott
2017-02-13 11:28:46 +00:00
parent 370fe24a83
commit 01fdd1d034

View File

@@ -11,7 +11,7 @@ Create an account
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">Create an account</h1>
<form method="post" autocomplete="nope">
<form method="post" autocomplete="nope" novalidate>
{{ textbox(form.name, width='3-4') }}
{{ textbox(form.email_address, hint="Must be from a central government organisation", width='3-4', safe_error_message=True) }}
{{ textbox(form.mobile_number, width='3-4', hint='Well send you a security code by text message') }}