I am newbie to Knockout MVC.
I want to check password and compare password.It must be same before going to save the data in database.I am using 'jquery.validate.js' for other validation.
And i want to use this js for compare validation also.Is there any way to use 'jquery.validate.js' js for compare validation?
Below is my code :
Password: @ko.Html.Password(m => m.Password, new { id = "txtPassword", @class = "required" }).ValueUpdate(KnockoutValueUpdateKind.AfterKeyDown)
Confirm Password: @ko.Html.Password(m => m.ConfirmPassword, new { id = "txtConfirmPassword", @class = "required", validateDelegate = "password equalTo" }).ValueUpdate(KnockoutValueUpdateKind.AfterKeyDown)
and i use Script also.
<script type="text/javascript">
$("#MyForm").ajaxForm();
rules: {
password: "required",
confirmPassword : {equalTo: "#txtPassword"}
}
$("#MyForm").validate({ submitHandler: function () { @ko.ServerAction("Save", "SaveData"); } });
</script>
This code throw me an error for related token identifier in Browser's Console