I have following simple login form with 'required' on password:
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<form action="/login" class="navbar-form navbar-right" method="post">
<div class="form-group">
<input type="text" class="form-control" name="username" placeholder="Login">
</div>
<div class="form-group">
<input type="password" class="form-control" name="pwd" placeholder="Password"
required oninvalid="this.setCustomValidity('Please enter your password')">
</div>
<button type="submit" class="btn btn-primary">Log in</button>
</form>
</ul>
</div>
If user clicks "Log in" and pwd
input is empty, error message will be shown as expected, however if user enters his password after such failed attempt the error message will keep appearing again making "Log in" button uninteractible(even though there is an input in pwd
at the moment) until the pwd
input loses focus. (I am using bootstrap 3.3.5 and chrome browser.)
How can I fix this bug?