Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How is the validation done in aem forms?

Avatar

Avatar
Level 1
pranavl70749643
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
pranavl70749643
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
pranavl70749643
Level 1

26-12-2019

I am new to aem form so please help?
How is the client-side and server-side validation done in aem forms exactly?
I have seen that there is a pattern field where you can give regex patterns to validate but how to add more complex business logic validations.
I have seen that in the code editor we can write logics but how do I set the field to invalid if the conditions fail?
And when I check the server-side revalidation will all my validations written in the code editor be revalidated on the server-side?

It would be helpful if you could provide a good article link on aem form field validation.

AEm form validation

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

309 likes

Total Posts

1,131 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

309 likes

Total Posts

1,131 posts

Correct Reply

184 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

05-01-2020

If you have complex logic to validate then use code editor.

 

You need to choose the option "validate". The event checks for Boolean as return value, so your code logic should return either true or false. I would suggest start with a simple code in validate  and I will continue to share inputs with you.

 

Thanks,

Mayank

Answers (0)