<input type="password" id="pwd" required data-pristine-required-message="Please Enter a password"
data-pristine-pattern="/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$/"
data-pristine-pattern-message="Minimum 8 characters, at least one uppercase letter, one lowercase letter and one number" class="form-control" />
<input type="password" data-pristine-equals="#pwd" data-pristine-equals-message="Passwords don't match" class="form-control" />
window.onload = function() {
// pristinejs validation
var form = document.getElementById("pristine-valid-example");
var pristine = new Pristine(form);
form.addEventListener('submit', function(e) {
var valid = pristine.validate();
// alert('Form is valid: ' + valid);
if (valid) {
return true;
} else {
e.preventDefault();
}
});
}
Doesn't validate the data-pristine-equals