Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Dialog validation not working in 6.4

Avatar

Level 2

Having issue with validating dialog fields(in 6.4).
Same is working in AEM 6.1.

2 fields are there, One dropdown and one is textbox. Both should be mandatory.
My select box resource type is: granite/ui/components/foundation/form/select
1)

else if ($(checkField).hasClass("coral-Select")) {

                inputField = $(checkField).find("select option:selected");

                var inputFieldPatent = $(inputField).parent();

                inputFieldPatent.checkValidity();

                inputFieldPatent.updateErrorUI();

            }

2)I tried with:
   var api = $(dropdownValidate).adaptTo("foundation-validation");

    if (api) {

        api.checkValidity();

        api.updateUI();

    }
also not working.

3 Replies

Avatar

Community Advisor

you can add required=true property in item to make it mendatory. Let me know if you need JS code as well. I have examples.

TextField — Granite UI 1.0 documentation

Select — Granite UI 1.0 documentation 



Arun Patidar

Avatar

Level 2

Hi arunpatidar26
Can you provide me a way of making a text field as mandatory field in TOUCH UI for multifield component in AEM 6.4

Avatar

Community Advisor

yes, just use property required(Boolean)=true.



Arun Patidar