Skip to content

Commit

Permalink
Merge pull request #12 from Ilhasoft/fix/disable-sign-up-button
Browse files Browse the repository at this point in the history
fix(validations) fix username validation
  • Loading branch information
matheusm authored Jun 8, 2021
2 parents 18974aa + 046da55 commit 8e7b780
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion themes/ilhasoft/login/register.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@


<#if !realm.registrationEmailAsUsername>
<div class="input-medium ${messagesPerField.printIfExists('username', properties.kcFormGroupErrorClass!)}">
<div ref="username" class="input-medium ${messagesPerField.printIfExists('username', properties.kcFormGroupErrorClass!)}">
<label for="username">
<div class="label">${msg("username")}</div>

Expand Down Expand Up @@ -232,6 +232,8 @@
].every(field => {
if (['firstName', 'lastName'].includes(field)) {
return this[field].length >= 3;
} if(['username'].includes(field)){
return this.$refs.username ? this[field].length : true;
} else {
return this[field].length;
}
Expand Down

0 comments on commit 8e7b780

Please sign in to comment.