From 4dc0a90ef8a3a33ab32f6711898a7687a7371b73 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Mar 2019 18:29:25 +0100 Subject: register: Add simple client-side validation --- templates/register.html.ep | 8 ++++---- 1 file 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 @@
account_circle - %= text_field 'user', id => 'account', class => 'validate' + %= text_field 'user', id => 'account', class => 'validate', required => undef, pattern => '[0-9a-zA-Z_-]+', maxlength => 60
email - %= email_field 'email', id => 'email', class => 'validate' + %= email_field 'email', id => 'email', class => 'validate', required => undef, maxlength => 250
lock - %= password_field 'password', id => 'password', class => 'validate' + %= password_field 'password', id => 'password', class => 'validate', required => undef, minlength => 8
lock - %= password_field 'password2', id => 'password2', class => 'validate' + %= password_field 'password2', id => 'password2', class => 'validate', required => undef, minlength => 8
-- cgit v1.2.3