Skip to content

Instantly share code, notes, and snippets.

@jagjeetgit
Created February 20, 2018 06:28
Show Gist options
  • Save jagjeetgit/f4b83b9f96876e1d66e31d78f38766e7 to your computer and use it in GitHub Desktop.
Save jagjeetgit/f4b83b9f96876e1d66e31d78f38766e7 to your computer and use it in GitHub Desktop.
Uniform Field Validations on Tap out or Focus out using Root Panel Script
var classesToValidate = ["guideNumericBox"]; //add "," separated widget classes you want to validate on focus/tap out
this.visit(function(cmp) {
if(classesToValidate.indexOf(cmp.className) !== -1) {
$("." + cmp.name + " input").focusout(function() {
guideBridge.resolveNode(cmp.name).validate();
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment