Article ID: 117932, created on Oct 14, 2013, last review on May 27, 2014

  • Applies to:
  • APS

Symptoms

A user can submit a form in Custom UI when some fields in this form are not valid.

Cause

Validation check is not added to onSubmit method

Resolution

You should call aps/PageContainer's validate() method to check if all fields are valid. For example, assuming my PageContainer has an id of 'top':

aps.app.onSubmit = function() {
    var form = registry.byId("top");
    if (!form.validate()){
        console.log("Not all fields are valid");
        aps.apsc.cancelProcessing();
        return;
    }
    // normal processing logic below this line
}

Additional information and examples can be checked on the PageContainer documentation page.

717db81efe94e616312b74fb03a5d474

Email subscription for changes to this article
Save as PDF