Sunday, May 7, 2017

html 5 password validation

<input id="password" name="password" type="password" pattern="^\S{6,}$" 
onchange="this.setCustomValidity(this.validity.patternMismatch ? 
'Must have at least 6 characters' : ''); if(this.checkValidity()) 
form.password_two.pattern = this.value;" placeholder="Password" required>

<input id="password_two" name="password_two" type="password" 
pattern="^\S{6,}$" onchange="this.setCustomValidity(this.validity.patternMismatch ? 
'Please enter the same Password as above' : '');" placeholder="Verify Password" required>

No comments:

Post a Comment