1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-05 21:57:31 +02:00

Version 1.5.3 increas characters for title and author to 50

This commit is contained in:
trendschau
2022-02-10 16:20:08 +01:00
parent 1c76fdf10b
commit e4e61d5be7
2 changed files with 4 additions and 4 deletions

View File

@@ -290,8 +290,8 @@ class Validation
$v = new Validator($params);
$v->rule('required', ['title', 'author', 'copyright', 'year', 'editor']);
$v->rule('lengthBetween', 'title', 2, 20);
$v->rule('lengthBetween', 'author', 2, 40);
$v->rule('lengthBetween', 'title', 2, 50);
$v->rule('lengthBetween', 'author', 2, 50);
$v->rule('noHTML', 'title');
# $v->rule('regex', 'title', '/^[\pL0-9_ \-]*$/u');
$v->rule('regex', 'author', '/^[\pL_ \-]*$/u');

View File

@@ -25,13 +25,13 @@
<div class="medium{{ errors.settings.title ? ' error' : '' }}">
<label for="settings[title]">{{ __('Website Title') }} *</label>
<input type="text" name="settings[title]" id="title" pattern=".{2,20}" required title="{{ __('Use 2 to 20 characters') }}" value="{{ old.settings.title ? old.settings.title : settings.title }}" />
<input type="text" name="settings[title]" id="title" pattern=".{2,50}" required title="{{ __('Use 2 to 50 characters') }}" value="{{ old.settings.title ? old.settings.title : settings.title }}" />
{% if errors.settings.title %}
<span class="error">{{ errors.settings.title | first }}</span>
{% endif %}
</div><div class="medium{{ errors.settings.author ? ' error' : '' }}">
<label for="settings[author]">{{ __('Author') }}</label>
<input type="text" name="settings[author]" id="author" pattern="[^()/><\]\{\}\?\$@#!*%§=[\\\x22;:|]{2,40}" value="{{ old.settings.author ? old.settings.author : settings.author }}" title="{{ __('Use 2 to 40 characters') }} {{ __('Only the following special characters are allowed') }} a,b a.b a-b a_b a&b a+b" />
<input type="text" name="settings[author]" id="author" pattern="[^()/><\]\{\}\?\$@#!*%§=[\\\x22;:|]{2,50}" value="{{ old.settings.author ? old.settings.author : settings.author }}" title="{{ __('Use 2 to 40 characters') }} {{ __('Only the following special characters are allowed') }} a,b a.b a-b a_b a&b a+b" />
{% if errors.settings.author %}
<span class="error">{{ errors.settings.author | first }}</span>
{% endif %}