From e800d9a600327bb24f1882031af128a8d68a3345 Mon Sep 17 00:00:00 2001 From: swag Date: Tue, 9 May 2023 21:21:58 -0400 Subject: [PATCH] More validation fixes --- templates/remark/create.html.ep | 3 ++- templates/thread/create.html.ep | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/remark/create.html.ep b/templates/remark/create.html.ep index 2e71141..ad3f97a 100644 --- a/templates/remark/create.html.ep +++ b/templates/remark/create.html.ep @@ -7,7 +7,8 @@ <%= text_field author => session->{'author'}, ( id => 'author', maxlength => 63, - minlength => 1 + minlength => 1, + required => undef ) %> <% if (my $error = validation->error('author')) { =%>

Invalid author: 1 to 63 characters please.

diff --git a/templates/thread/create.html.ep b/templates/thread/create.html.ep index 9484ab4..f70e28d 100644 --- a/templates/thread/create.html.ep +++ b/templates/thread/create.html.ep @@ -7,7 +7,8 @@ <%= text_field author => session->{'author'}, ( id => 'author', maxlength => 63, - minlength => 1 + minlength => 1, + required => undef ) %> <% if (my $error = validation->error('author')) { =%>

Invalid author: 1 to 63 characters please.

@@ -19,7 +20,8 @@ id => 'title', maxlength => 127, minlength => 1, - autofocus => undef + autofocus => undef, + required => undef ) %> <% if (my $error = validation->error('title')) { =%>

Invalid title: 1 to 127 characters please.

@@ -31,7 +33,7 @@ id => 'body', maxlength => 4000, minlength => 2, - required => 'true', + required => undef, rows => 6 ) %> <% if (my $error = validation->error('body')) { =%>