Skip to content

Instantly share code, notes, and snippets.

@CrowderSoup
Created September 12, 2013 15:36
Show Gist options
  • Select an option

  • Save CrowderSoup/6539585 to your computer and use it in GitHub Desktop.

Select an option

Save CrowderSoup/6539585 to your computer and use it in GitHub Desktop.
Quick example of how to do validation with Knockout Validation.
self.validation = ko.validatedObservable({
'noteBody': self.noteBody
});
if (!self.validation.isValid()) {
self.validation.errors.showAllMessages();
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment