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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Metadata custom validation - Save button not getting disabled

Avatar

Community Advisor

I have followed the below-mentioned URL and worked on the custom validation on metadata schema. Once the error is shown, the metadata is getting saved even there is an error. Can someone please suggest if there is something missing?

https://medium.com/@theopendle/aem-custom-metadata-forms-for-assets-8c6597205f9d

 

Note: I have worked on the "Applying validations to form fields" section.

 

@theopendle 

 

Thanks,

Kiran Vedantam.

0 Replies

Avatar

Community Advisor

Hi @Kiran_Vedantam,

I tried in my local - AEM 6.5.0 and it works fine. 

Could you please let know

  • If you are getting the validation message upon "Save & Close" CTA (This wont grey out/be in disabled state but stopsPropogation) in addition to the error message that we set as part of validate function(that displays near the respective field)
  • Instance details in which you are trying this.

Avatar

Community Advisor
When I click the save button, it is getting saved. This is working fine at page properties level, but not working at metadata level

Avatar

Level 1

Hi @Vijayalakshmi_S 

I also tried the same in 6.5.10 and it works as explained for a required field. For a non-required field, the error message near the respective field is coming but still I am able to save the properties. Is there any way to prevent this?