Script validation does not run for the File Attachment core component | Community
Skip to main content
Level 2
July 15, 2024
Question

Script validation does not run for the File Attachment core component

  • July 15, 2024
  • 1 reply
  • 507 views

AEM 6.5.19 with AEM Forms installed.

Does script validation run for the File Attachment core component or is it just broken in AEM Forms?  The mandatory validation works when I check Required.  However, when I create a simple Validate rule in the code editor (see attached screenshot) that includes...

console.log('File attachment validate running'); false;

...and then submit the form, I never see the specified string in the javascript console.  The red validation error doesn't show up on the field either.

Script validation runs on text fields just fine.  I have the same Validate rule configured on a text field and I see the message in the console when I submit the form as well as the red validation error.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Khushwant_Singh
Adobe Employee
Adobe Employee
August 26, 2024

File attachment is composite component (A component designed using multiple existing components). You shall create and run rules on the child components and rules should work fine. The expected behaviour is to validate all child component if rule is to be written for a composite component.