More validation fixes

This commit is contained in:
swag 2023-05-09 21:21:58 -04:00
parent 697eebdc3a
commit e800d9a600
2 changed files with 7 additions and 4 deletions

View File

@ -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')) { =%>
<p class="field-with-error">Invalid author: 1 to 63 characters please.</p>

View File

@ -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')) { =%>
<p class="field-with-error">Invalid author: 1 to 63 characters please.</p>
@ -19,7 +20,8 @@
id => 'title',
maxlength => 127,
minlength => 1,
autofocus => undef
autofocus => undef,
required => undef
) %>
<% if (my $error = validation->error('title')) { =%>
<p class="field-with-error">Invalid title: 1 to 127 characters please.</p>
@ -31,7 +33,7 @@
id => 'body',
maxlength => 4000,
minlength => 2,
required => 'true',
required => undef,
rows => 6
) %>
<% if (my $error = validation->error('body')) { =%>