How develop function for password and confirmpassword in jquery,i want when i create confirm password, there is message show's "password and confirmpassword incorrect !" until the password and confirmpassword are the same and tnak's
Asked
Active
Viewed 43 times
1 Answers
1
If you need a function to validate password, try this:
jQuery(document).ready(function($) {
function validate_password(){
var password = $('#password_field_id').val();
var confirm_password = $('#confirm_password_field_id').val();
if(password === confirm_password){
//Do something if password matches
}
else{
// alert something saying password don't match
}
}
});