I am using SXA 1.8, and Sitecore 9.1

I am trying to add a validation for a Date type field where it is required, and the user cannot save the item unless this field has a value, I have copied Sitecore's "Required" validator found at /sitecore/system/Settings/Validation Rules/Field Rules/Required, and added the following to it: enter image description here

I then added this validation for the template field i wanted, like this: enter image description here

However, whenever i try to save the items of that template without filling in the required field, it saves normally,and no validation warning or anything is issued. Any advice on what could be missing to achieve the goal of stopping the user from saving if this field is not filled is appreciated.

  • What is the type of the field where you would like to use this validation? Feb 14 '19 at 14:30
  • @TamásTárnok Date type field Feb 14 '19 at 14:35
  • If you're logged in with an account that is administrator, these will be bypassed
    – Mark Cassidy
    Feb 14 '19 at 14:41
  • If you show raw values on the item, does the field have a value? Some field types have values even if they're "empty." Feb 14 '19 at 14:50
  • 1
    @ Mark Cassidy what role should i give to the user so that validations can be applied?
    – AME
    Mar 26 '19 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.