Search code examples
validationknockout.jsvisible

Knockout validation plugin and visible


Is there a way to say validation plugin to validate only field with ":visible" selector? There are 2 blocks on form. And only one of them can be visible in one moment. For the invisible block i don't need validate the hidden data. Is it solution in validation plugin, such as in jQuery validation plugin?

ignore: "input[type='text']:hidden"


Solution

  • Thanks, danludwig. Using a ko.validation.group() - is a answer. group is solve problem. I don't understand only, why this feature don't describe in docs.