How to exclude an observable from validation group of knockout js?

Viewed 183

This is my code

    self.BusinessDate.extend({ required: false }).extend({ isBusinessDate: {
         url: '@Url.Action("ValidBusinessDate", "Data")',
         date: self.BusinessDate()
          }
     }).extend({
      onlyIf: function() {
       return self.OverrideEffectiveDate() === "Y";
      }
   });

Validation is working fine but I just want to use the message of the validation and exclude the observable self.BusinessDate from my ko.validation.group. I tried like this

self.validate = ko.validation.group(self.BusinessDate, { deep: false });

Any advice??

0 Answers
Related