Touch UI multifield - making a field mandatory
Is there a way to make one of the fields in a custom multifield mandatory in touch UI? would be helpful if there is any implementation reference of the cq:dialog for this.
Is there a way to make one of the fields in a custom multifield mandatory in touch UI? would be helpful if there is any implementation reference of the cq:dialog for this.
If you are using Touch UI for dialogs, you should add
required="{Boolean}true"If you are using old Ext Js dialogs, you should add
allowBlank="false"
as a property to the dialog item.
Also have a look at this,
Link:- http://www.nateyolles.com/blog/2016/02/aem-touch-ui-custom-validation
// AEM Touch UI Custom Validation
Here you can write any code for any validation check that you need. Registering custom validators is done by calling the jQuery based $.validator.register method. The register method takes a single JavaScript object literal argument. The parameter looks for four properties: selector, validate, show and clear, of which only selector is required.
~kautuk
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.