feat: minlength validation
continuous-integration/drone/push Build is passing Details

This commit is contained in:
cellarspoon 2022-01-10 10:33:07 +01:00
parent df35fe181a
commit 3f326b74d6
No known key found for this signature in database
GPG Key ID: 03789458B3D0C410
3 changed files with 35 additions and 7 deletions

View File

@ -11,3 +11,15 @@ th, td {
table, th, td {
border: 1px solid black;
}
input {
border: 2px solid currentcolor;
}
input:invalid {
border: 2px dashed red;
}
input:invalid:focus {
background-image: linear-gradient(magenta, pink);
}

View File

@ -11,3 +11,19 @@ th, td {
table, th, td {
border: 1px solid black;
}
input {
border: 2px solid currentcolor;
}
input:invalid {
border: 2px dashed red;
}
input:invalid:focus {
background-image: linear-gradient(magenta, pink);
}
.error {
color: red;
}

View File

@ -5,27 +5,27 @@
</p>
{% if exception %}
<p>Oops, something went wrong: {{ exception }} 😬</p>
<p class="error">Oops, something went wrong: {{ exception }} 😬</p>
{% endif %}
<form method="post" action="{{ url_for('form_keycloak_register') }}">
<label for="first_name">First name:</label>
<input type="text" name="first_name" value="{{ first_name }}" />
<input type="text" name="first_name" value="{{ first_name }}" minlength="3" />
<label for="last_name">Last name:</label>
<input type="text" name="last_name" value="{{ last_name }}" />
<input type="text" name="last_name" value="{{ last_name }}" minlength="3"/>
<label for="username">Username:</label>
<input type="text" name="username" value="{{ username }}" />
<input type="text" name="username" value="{{ username }}" minlength="3"/>
<label for="email">Email:</label>
<input type="text" name="email" value="{{ email }}" />
<input type="text" name="email" value="{{ email }}" minlength="3"/>
<label for="password">Password:</label>
<input type="password" name="password" />
<input type="password" name="password" minlength="8"/>
<label for="password_again">Password (just to be sure):</label>
<input type="password" name="password_again" />
<input type="password" name="password_again" minlength="8"/>
<input type="hidden" name="invited_by" value="{{ invited_by }}"/>