Validate specific controls on each button click in Knockout js

575 views Asked by At
 var Inquiry = function (inquiry) {
        var self = this;
        self.InquiryDetails = ko.observable(inquiry.InquiryDetails).extend({ required: true });
        self.MediaDate = ko.observable(inquiry.MediaDate).extend({ required: true });
    }

I have 2 buttons on the screen on the screen "Save" & "Submit".

On Click of save button, Inquiry Details validation should be checked.

On Click of Submit button, both Media Date and Inquiry Details validation should be checked.

How to achieve this using Knockout JS Validation?

0

There are 0 answers