Expand my Community achievements bar.

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.

5 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

Community Advisor
Is it possible for you to share the JS and AEM instance version

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?

Avatar

Community Advisor

@ultimatixmyhr 

I will try to reproduce with SP 10 from my end and update here.