Confirm Password

I am having few issues with confirm password code.

  1. “Password fields do not match” message is not shown on my webpage when both passwords are not the same.

  2. Even my passwords are match, when I click “signup”, still have this error message pop up - save operation failed: DatasetError: Some of the elements validation failed" at line 12.

May I know what wrong with my code ?

Thanks in advance !

If you are following this tutorial here, then make sure you follow it carefully. Also, make sure that all your element id names match up in your code and also it would be easier to change text83 to validationmesages so that you know what that text box is, plus you didn’t need to change that code part either then.
https://www.wix.com/corvid/example/custom-validations

The code in the tutorial is as this:
};
$w(“#emailConfirmInput”).onCustomValidation(validateEmail(“#emailInput”));
$w(“#emailInput”).onCustomValidation(validateEmail(“#emailConfirmInput”));

However you have yours as this:
};
$w(“#password1”).onCustomValidation(validatePass(“#password2”));
$w(“#password2”).onCustomValidation(validatePass(“#password1”));

When it should be:
};
$w(“#password2”).onCustomValidation(validatePass(“#password1”));
$w(“#password1”).onCustomValidation(validatePass(“#password2”));

Also, check out these other pages for validation info too.
https://support.wix.com/en/article/corvid-about-validating-user-input-with-code
https://support.wix.com/en/article/working-with-user-input-validation-in-the-settings-panel
https://www.wix.com/corvid/reference/$w.ValidatableMixin.html

You can also do the same just for a single text input if you wanted as shown here.
https://www.wix.com/corvid/reference/$w.TextInput.html
https://www.wix.com/corvid/forum/community-discussion/text-field-validation