How to add email validation to the text field in aem? | Community
Skip to main content
Employee
Sep 1, 2022 10:47 AM UTC
Solved

How to add email validation to the text field in aem?

Hi,

I need to enable validation for custom textfield in page properties. How to write js for email validation?

Thank you 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
HeenaMadan
HeenaMadanAccepted solution
New Participant
Sep 1, 2022 12:05 PM UTC

You need to write custom javascript to validate email field. Use regex to validate email format. Refer https://github.com/techforum-repo/youttubedata/blob/master/aem/custom-validation-multifields-1.0.zip

to get validation.js for email validtaion.

2 replies

HeenaMadan
HeenaMadanAccepted solution
New Participant
Sep 1, 2022 12:05 PM UTC

You need to write custom javascript to validate email field. Use regex to validate email format. Refer https://github.com/techforum-repo/youttubedata/blob/master/aem/custom-validation-multifields-1.0.zip

to get validation.js for email validtaion.

Translate
Pallavi_Shukla_
New Participant
Sep 1, 2022 10:58 AM UTC

hi @keerthana_h_n 

 

Please check this blog - it has sample js written for email validation

 

https://www.albinsblog.com/2018/09/how-to-enable-custom-validation-on-multifield-touch-ui-aem.html#.YxCP8nZBy5c

Translate