issues Change min book-label length to 4 characters #152

This commit is contained in:
SvyatoslavArtymovych 2023-06-16 10:47:50 +03:00
parent 13a77f288f
commit 26325b01c7
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ from app.logger import log
class BaseBookForm(FlaskForm):
label = StringField("Label", [DataRequired(), Length(6, 256)])
label = StringField("Label", [DataRequired(), Length(4, 256)])
about = StringField("About")
tags = StringField("Tags")

View File

@ -17,7 +17,7 @@
<div>
<div class="col-span-6 sm:col-span-3 mb-2">
<label for="label" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" >Label</label >
<input type="text" name="label" id="label" maxlength="256" minlength="6" maxlength="256" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-600 focus:border-blue-600 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Name" required />
<input type="text" name="label" id="label" maxlength="256" minlength="4" class="shadow-sm bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-600 focus:border-blue-600 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Name" required />
</div>
<div class="col-span-6 sm:col-span-3">
<label for="about" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" >About</label >

View File

@ -59,7 +59,7 @@
{{ form_hidden_tag() }}
<input value="{{book.id}}" type="text" name="book_id" id="book_id" class="hidden" placeholder="Book id" required>
<div>
<label for="label" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Label</label>
<label for="label" maxlength="256" minlength="4" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Label</label>
<input value="{{book.label}}" type="text" name="label" id="label" class="book-label-input bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="My Book" required>
</div>
<div>