1

We have some integration running that's adding html with necessary data attributes to a RichText field, the validator is flashing this as invalid when it is valid in this use case.

How to disable the RichText html validation on a single template field?

The only options I have found are to disable for all RichText fields globally which is not what we want.

3
  • Did you check this? sitecore.stackexchange.com/questions/3774/… Mar 29, 2023 at 11:46
  • @SumitBhatia yes that disables for ALL richtext fields, I need to only apply on a single template field
    – Sean T
    Mar 29, 2023 at 11:48
  • @SumitBhatia That example shows how to remove globally, and the edit shows how to only apply to RichText type... there's no example showing how to apply to a template field
    – Sean T
    Mar 29, 2023 at 11:54

2 Answers 2

1

Now sure with the particular field but yes, If you want to remove the validation rules from a particular item, then you can do this by using a field on the item called Suppressed Validation Rules

According to the Sitecore document, Validation issues no longer appear in the Quick Action Bar if you suppress global validation rules on individual content items.

Refer to this document:

https://doc.sitecore.com/xp/en/developers/92/sitecore-experience-manager/the-validation-options.html

For example, you can use this one Full Page XHtml, Item ID {9DE34911-96D5-48C3-AFFF-20CFF4D5AB02}. And this is the item ID of the Full Page XHtml validation rule.

Read this thread for more details.

https://stackoverflow.com/questions/8452005/how-do-i-turn-off-xhtml-validation-in-sitecore#:~:text=If%20you%20go%20into%20System,XHTML%20validation%20rule%20from%20there.

2
  • This lets me do it on a content item or standard values, but I don't appear to have the Suppressed Validation Rules field on the template field itself. I can adapt this method and will accept it if there's no other solution put forwards
    – Sean T
    Mar 30, 2023 at 12:26
  • Full Page XHtml, Item ID {9DE34911-96D5-48C3-AFFF-20CFF4D5AB02} didn't work for me. The trick is to add just the GUID to the Suppressed Validation Rules. So just add {9DE34911-96D5-48C3-AFFF-20CFF4D5AB02}. Also, this did not suppress the Rich Text Editor IsXhtml warnings. So I had to add {CB57D0E7-5202-4C3D-838B-314F2B95A2CB} instead to the Suppressed Validation Rules. Mar 30, 2023 at 19:17
1

Full Page XHtml, Item ID {9DE34911-96D5-48C3-AFFF-20CFF4D5AB02} didn't work for me. The trick is to add just the GUID to the Suppressed Validation Rules. So, just add {9DE34911-96D5-48C3-AFFF-20CFF4D5AB02}. Also, this did not suppress the Rich Text Editor IsXhtml warnings. So I had to add {CB57D0E7-5202-4C3D-838B-314F2B95A2CB} instead. Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.