Custom validation logic in Content Fragment Model | Community
Skip to main content
Level 4
Feb 9, 2021 12:55 AM UTC
Investigating

Custom validation logic in Content Fragment Model

Request for Feature Enhancement (RFE) Summary: With more and more increased usage of Content Fragment for Headless applications (who consume JSON CFs from AEM), there is plenty of requirement where application teams need more control on each fields in Content Fragment. Currently there is no option to add custom field validations, add javascript validations or Regex in Content Fragment.
Use-case: Content Authors make mistake where they save and publish critical data in CFs. Need custom validation logic option to be added in each datatype so that we can add more checks.
Current/Experienced Behavior: No validation logic in datatypes except very basic like Required.
Improved/Expected Behavior: Validation logic for each datatypes and among different datatypes in each content fragment model.
Environment Details (AEM version/service pack, any other specifics if applicable): AEM 6.5.5
Customer-name/Organization name: Manulife
Screenshot (if applicable):  
Code package (if applicable):  

3 replies

CedricHuesler
Employee
Apr 27, 2021 6:15 AM UTC

Starting AEM on Cloud Service Version 2021.01, field level validation options have been added. At the time of writing, there is, for a text field:

  • E-Mail
  • URL
  • Custom (allows to provide a regex to validate)

For other data types, such as Content Reference allow to configure file type and image size constrains.

 

The plan is to bring this capability in 6.5.10.

Translate
Employee
Mar 28, 2021 10:57 PM UTC

Setting the status accordingly once the issue is under investigation/Triage by the product team.

Translate
Employee
Feb 20, 2021 1:01 PM UTC

Hi @mayukh007 

Thanks for submitting this improvement idea. It seems to be similar to an idea that has already been submitted in this thread. Please check and let us know.

Translate