knockout validation tutorials

12,674

Google is your only friend here im afraid, but funny you took conditional validation as an example since that is in the docs :D

https://github.com/Knockout-Contrib/Knockout-Validation/wiki/Conditional-Validation

Quick example http://jsfiddle.net/Va2yw/

ViewModel = function() {
    this.validate = ko.observable(true);
    this.required = ko.observable().extend({ required: { onlyIf: this.validate } });
};
Share:
12,674
Ancient
Author by

Ancient

Anything i loves or hate totally depends on my mood , working as a software engineer

Updated on June 17, 2022

Comments

  • Ancient
    Ancient about 2 years

    I am working with knockout and now i have to work on validation so that
    i choose knockout-validation . But as far as i searched on Google ,
    i didn't find any tutorial about which i can say that its good
    and in fact the problem is that there is not so good documentation of knockout-validation .

    I am facing many problems in knockout-validation , like

    Implementing conditional validation etc etc.
    

    Any body have link to a good tutorial .

    Thanks

  • Ancient
    Ancient about 11 years
    i know its in docs , i just talked about it as a example