Questions tagged [validation]

For questions related to Sitecore item and field validation rules within the Sitecore Client

Filter by
Sorted by
Tagged with
9
votes
3answers
2k views

Item validator access already stored data instead of newly inputed data

Im facing a problem with sitecore item validator when I try to save the data. The purpose of my validator (the class inherit from StandardValidator) is to simply check if, atleast, field A or field B ...
8
votes
1answer
750 views

Standard Required field validation reporting field is empty after upgrade to Sitecore 9.0 Update-2

We're getting an interesting validation error after upgrading from Sitecore 8.2 Update-6 to Sitecore 9 Update-2. We have the standard Required validator on a field (item name of the field is Title). ...
2
votes
1answer
2k views

Sitecore Field Validator Change to Custom Message

I have a field that is a required field validator in Sitecore. I marked that field as required and Set the parameter=FatalError so that users cannot save the item without entering data in that field. ...
2
votes
0answers
531 views

FatalError Required validation not working

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 ...
1
vote
1answer
2k views

Remove 'Is valid XHtml' validation rule for Rich Text field

We have a Rich Text field where we are storing our email's html. When i try to save the item, i ended up with validation error like The field "EmailBody" contains (or lacks) some formatting ...
2
votes
2answers
4k views

'IServiceProvider' does not contain a definition for 'GetService'

This is the first time i deal with custom validations, but I need to create a unique email validation using sitecore 9.0.2 and SXA 1.7.1 so i was following this tutorial http://sitecoresolution....
4
votes
0answers
379 views

Apply field validations across fields

I'm building a component that, among other fields, contains "title" and "text" fields. The business logic is: If both fields are empty, that is OK If both fields are populated, that is OK If one ...
4
votes
1answer
2k views

Sitecore validation rule at field level in multi-list value selection range

I came across this multi-list field restrictions to limit range(selection) using regex. I got few references to add basic validations. Both work fine. Ref1: ^({[^}]+}\|?){0,5}$ http://www.benramey....