0

i want to make a textbox required via knockout.js what i want is 1.- Click a radiobutton(value 1) = TextboxAutor not required 2.- Click a radiobutton(value 2) = TextboxAutor required

in my Code from default i have self.Author = ko.observable().extend({ required: true });

when im trying to use self.Author .extend({ validatable: false }); via a button, it works, but when i try to use validatable : true

is not working, is there a way to make an observable required true again ? also i'm using the latest version of ko.js and ko.validation.js

Frann Lp
  • 3
  • 2
  • 6
  • https://stackoverflow.com/questions/17120416/how-to-remove-extender-from-an-existing-observable – Bludev Jun 25 '19 at 08:01
  • @Bludev Yeah i can remove the validatable, but the problem is, after i remove it i can't add the required again. – Frann Lp Jun 25 '19 at 18:35
  • 1.- Click radiobuttton(with value 1) to Remove (.extend({ validatable: false })) . 2.- Click radiobutton(with value 2) to Add (.extend({ validatable: TRUE })) this is not working – Frann Lp Jun 25 '19 at 18:44

0 Answers0