Fix javascript for white space message for register.jsp
This commit is contained in:
parent
8fa3d0f6c4
commit
87ebab0b73
|
@ -109,12 +109,12 @@
|
|||
<span class="msg_password_error uk-text-danger uk-text-small uk-float-left" style="${msg_password_error_display}">Please enter your password.</span>
|
||||
<span class="msg_pass_conf_error uk-text-danger uk-text-small uk-float-left" style="${msg_pass_conf_error_display}">These passwords don't match.</span>
|
||||
<p>
|
||||
<span class="msg_whitespace uk-text-danger uk-text-small uk-float-left" style="display:none">White space is not allowed</span>
|
||||
<span class="msg_please_add uk-text-danger uk-text-small uk-float-left" style="display:none">Please add:  </span></p>
|
||||
<span class="msg_lowercase_letter uk-text-danger uk-text-small uk-float-left" style="display:none">A lowercase letter.  </span>
|
||||
<span class="msg_capital_letter uk-text-danger uk-text-small uk-float-left" style="display:none">A capital (uppercase) letter.   </span>
|
||||
<span class="msg_number uk-text-danger uk-text-small uk-float-left" style="display:none">A number.  </span>
|
||||
<span class="msg_lenght uk-text-danger uk-text-small uk-float-left" style="display:none">Minimum 6 characters (no white space allowed).  </span>
|
||||
<span class="msg_lenght uk-text-danger uk-text-small uk-float-left" style="display:none">Minimum 6 characters.  </span>
|
||||
<p><span class="msg_whitespace uk-text-danger uk-text-small uk-float-left" style="display:none">No white space allowed.  </span></p>
|
||||
<span class="msg_invalid_password uk-text-danger uk-text-small uk-float-left" style="${msg_invalid_password_display}">The password must
|
||||
contain a lowercase letter, a capital (uppercase) letter, a number and must be at least 6 characters long. White space character is not allowed.</span>
|
||||
<input id="password" name="password" type="password" placeholder="Password" class="form-control"></div>
|
||||
|
@ -147,10 +147,11 @@
|
|||
// When the user starts to type something inside the password field
|
||||
myInput.onkeyup = function() {
|
||||
|
||||
if (/\s/g.test(myInput.value)) {
|
||||
$("msg_whitespace").fadeIn();
|
||||
var space = /[\s]+/g;
|
||||
if (myInput.value.match(space)) {
|
||||
$(".msg_whitespace").fadeIn();
|
||||
} else {
|
||||
$("msg_whitespace").fadeOut();
|
||||
$(".msg_whitespace").fadeOut();
|
||||
}
|
||||
|
||||
// Validate lowercase letters
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<span class="msg_capital_letter uk-text-danger uk-text-small uk-float-left" style="display:none">A capital (uppercase) letter.   </span>
|
||||
<span class="msg_number uk-text-danger uk-text-small uk-float-left" style="display:none">A number.  </span>
|
||||
<span class="msg_lenght uk-text-danger uk-text-small uk-float-left" style="display:none">Minimum 6 characters.  </span>
|
||||
<p><span class="msg_space uk-text-danger uk-text-small uk-float-left" style="display:none">No white space allowed  </span></p>
|
||||
<p><span class="msg_space uk-text-danger uk-text-small uk-float-left" style="display:none">No white space allowed.  </span></p>
|
||||
<%--<span id="server_invalid_password_error" class="uk-text-danger uk-text-small uk-float-left">${msg_invalid_password}</span>--%>
|
||||
<%--<c:remove var="msg_invalid_password" scope="session" />--%>
|
||||
<input id="password" name="password" type="password" placeholder="Password" class="form-control"></div>
|
||||
|
|
Loading…
Reference in New Issue