Hi All,
I have used core form in my project and found that in out of the box core form text component there is no validation, I can able to put scripts as well in text and password fields.
Can anyone suggest how can we enable the validation?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi, if you are able to write validation scripts for different fields in the form and the validation is not working then there might be an issue with your script (or) AEM might not be able to see your script.
In case, you think your script is right and you have used proper functions you can try with the following options:
1. add console and alert statements in the script and see if they are working
2. check the console in the browser for any js related errors
3. use the browser's inbuilt debugger to debug your js code
If AEM is not able to see your script, make sure you have put the js file at the right place. Use console and alert statements to make sure your script is working.
Hi, if you are able to write validation scripts for different fields in the form and the validation is not working then there might be an issue with your script (or) AEM might not be able to see your script.
In case, you think your script is right and you have used proper functions you can try with the following options:
1. add console and alert statements in the script and see if they are working
2. check the console in the browser for any js related errors
3. use the browser's inbuilt debugger to debug your js code
If AEM is not able to see your script, make sure you have put the js file at the right place. Use console and alert statements to make sure your script is working.
Here are the steps to enable validation for the text and password fields:
Once you have enabled the validation for the text or password field, AEM will automatically validate the input based on the configured validation settings. If the input does not meet the specified criteria, an error message will be displayed to the user.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/wcm-components/form...
@kanikaa32870678 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes