summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-05 18:29:25 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-05 18:29:25 +0100
commit4dc0a90ef8a3a33ab32f6711898a7687a7371b73 (patch)
tree6a8a811cd14973596e771a8f3e258de5ee113448 /templates
parent8d353fcf9df1fa2acaf10ff3545a0b3d96810dfb (diff)
register: Add simple client-side validation
Diffstat (limited to 'templates')
-rw-r--r--templates/register.html.ep8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/register.html.ep b/templates/register.html.ep
index 3e69239..48afddf 100644
--- a/templates/register.html.ep
+++ b/templates/register.html.ep
@@ -60,22 +60,22 @@
<div class="row">
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">account_circle</i>
- %= text_field 'user', id => 'account', class => 'validate'
+ %= text_field 'user', id => 'account', class => 'validate', required => undef, pattern => '[0-9a-zA-Z_-]+', maxlength => 60
<label for="account">Name</label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">email</i>
- %= email_field 'email', id => 'email', class => 'validate'
+ %= email_field 'email', id => 'email', class => 'validate', required => undef, maxlength => 250
<label for="email">Mail-Adresse</label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">lock</i>
- %= password_field 'password', id => 'password', class => 'validate'
+ %= password_field 'password', id => 'password', class => 'validate', required => undef, minlength => 8
<label for="password">Passwort</label>
</div>
<div class="input-field col l6 m12 s12">
<i class="material-icons prefix">lock</i>
- %= password_field 'password2', id => 'password2', class => 'validate'
+ %= password_field 'password2', id => 'password2', class => 'validate', required => undef, minlength => 8
<label for="password2">Passwort wiederholen</label>
</div>
</div>