Skip to content

Instantly share code, notes, and snippets.

@buildmotion
Created August 28, 2021 19:49
Show Gist options
  • Save buildmotion/3f8629fab03c327fc876498c53529be9 to your computer and use it in GitHub Desktop.
Save buildmotion/3f8629fab03c327fc876498c53529be9 to your computer and use it in GitHub Desktop.
this.validationContext
.withSource(this.actionName)
.addRule(new rules.AreEqual('ThingsAreEqual', 'The things are not equal.', 'this', 'that', false))
.addRule(new rules.IsTrue('ThisIsTrue', 'This is not true', this.isDone, true))
.addRule(new rules.IsTrue('Really?', 'Is it really true?', false))
.addRule(new rules.StringIsNotNullEmptyRange('StringIsGood', 'The string is not valid.', 'Hi', 3, 10));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment