You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just copy the code and replace the form id with my form id. But the valid variable always returns true. It's doesn't return any error or anything.
// pristine validation
window.onload = function () {
var form = document.getElementById("sign-in");
// create the pristine instance
var pristine = new Pristine(form);
form.addEventListener("submit", function (e) {
e.preventDefault();
// check if the form is valid
var valid = pristine.validate(); // returns true or false
console.log(valid);
console.log(pristine);
});
};
The text was updated successfully, but these errors were encountered:
I just copy the code and replace the form id with my form id. But the valid variable always returns true. It's doesn't return any error or anything.
// pristine validation
window.onload = function () {
var form = document.getElementById("sign-in");
};
The text was updated successfully, but these errors were encountered: