Namespace: utils

bcdui.widgetNg. utils

A namespace for the BCDUI GUI widgetNg utils.

Methods

staticbcdui.widgetNg.utils.validate(targetHtml){Promise}

widgetNg/widgetUtils.js, line 24
Asynchronously triggers re-validation of visible widgets within container and focuses on first invalid input inside the targetHtml.
Name Type Description
targetHtml targetHtmlRef element to undergo widget validation, selector, element or jQuery object.
Returns:
Type Description
Promise resolving to { isValid : true|false }
Example
const form = jQuery('.form');
bcdui.widgetNg.utils.validate(form).then((validationResult) => {
  if (validationResult.isValid) {
    form.submit();
  }
});