AEM TouchUI dropdown mandatory validation

In AEM 6.2, there is no mandatory validation for dropdowns in dialogs, when having a „Please select“ option in place. This is due to a validation check in the out of the box AEM validator which does a check for „value != null“, which is not the case when having a „Please select“ option (value would just be a blank String).

There is currently no other option then implementing a custom validation. This requires the following steps:

  1. Create a new clientlib with the following configuration
  2. Add the following JavaScript to this clientlib. This JS validates all select fields with a specific property set (see step 3)
  3. To mark select fields as required (and enable this validation), put the property validation=“select.required“ on it:
     

No comments

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.