Expand my Community achievements bar.

Script validation does not run for the File Attachment core component

Avatar

Level 2

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Moderator

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.