knockout validation fails but still submits the form

Shiboku

New Member
I am using the knockoutvalidation.js library. I am using it to validate the password and confirm password fields. They must match. If I try to submit the first time it works fine, it blocks the submit but when i try to click submit the second time, it doesn't block it (It submits the form the second time you click submit).\[code\]this.confirm = ko.observable().extend({ validation: { validator: function (val, params) { return val === ko.validation.utils.getValue(params); }, message: 'Passwords do not match.', params: this.password } });\[/code\]
 
Back
Top