Skip to main content
December 27, 2019
해결됨

How is the validation done in aem forms?

  • December 27, 2019
  • 1 답변
  • 1745 조회

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.

이 주제는 답변이 닫혔습니다.
최고의 답변: Mayank_Gandhi

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

1 답변

Mayank_Gandhi
Adobe Employee
Adobe Employee
January 6, 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