rice-framework/krad-web/src/main/webapp/krad/scripts/krad.validate.js
/**
 * Validates all fields requiring validation, in a form or dialog.
 *
 * @param $action(optional) element that initiated the request, used to determine if invoked in dialog
 *
 * @returns {boolean} true if all fields requiring validation are valid, false otherwise
 *
 * @private
 */
Validates all fields requiring validation, in a form or dialog.

@param $action(optional) element that initiated the request, used to determine if invoked in dialog

@returns {boolean} true if all fields requiring validation are valid, false otherwise

@private
Validates all fields requiring validation in a form or dialog . @param $action ( optional ) element that initiated the request used to determine if invoked in dialog @returns { boolean } true if all fields requiring validation are valid false otherwise @private
function _validateFormOrDialog($action) {
    var inDialog = false;
    if ($action) {
        var $dialogGroup = $action.closest(kradVariables.DIALOG_SELECTOR);
        inDialog = $dialogGroup.length;
    }
    var valid = true;
    if (!inDialog) {
        valid = validate();
    }
    else if (inDialog) {
        valid = validate($dialogGroup);
    }
    return valid;
}
function _validateFormOrDialog ( $action ) { var inDialog = false ; if ( $action ) { var $dialogGroup = $action . closest ( kradVariables . DIALOG_SELECTOR ) ; inDialog = $dialogGroup . length ; } var valid = true ; if ( ! inDialog ) { valid = validate ( ) ; } else if ( inDialog ) { valid = validate ( $dialogGroup ) ; } return valid ; }
Validates all fields requiring validation, in a form or dialog.
Validates all fields requiring validation in a form or dialog .