Skip to content

Instantly share code, notes, and snippets.

@CrowderSoup
Created September 12, 2013 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrowderSoup/6539585 to your computer and use it in GitHub Desktop.
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