Skip to main content
13 votes
Accepted

How do I enforce Alt tags on all images in Sitecore

You are able to set the required validation item rule item to FATAL ERROR in Sitecore. This is the highest level of validation. This setting prevent the user to save the item with validation error.
Tamás Tárnok's user avatar
10 votes
Accepted

Stop user from saving and publishing when a field is Empty

1) Publishing To stop publishing when field is empty, there is no OOTB functionality. One option how you can achieve it with minimal effort is to put item (template) under workflow and use below ...
Peter Procházka's user avatar
10 votes
Accepted

Remove Alt Required validation from image

Go to /sitecore/system/Settings/Validation Rules/Field Types/Image item and remove the Image Has Alt Text from the Validation Rules section where you don't want to run this validator. What you removed ...
Tamás Tárnok's user avatar
9 votes
Accepted

Validator bar not appearing for general link field

The question update is your answer. That's standard behaviour of Sitecore. You should also see red squares on the right top. There you can see all invalid fields as squares. It is not really visible ...
Tamás Tárnok's user avatar
8 votes

How to prevent publish item using validation rule?

Yes, it is possible to do this without customization. Sitecore has the special validation rule that is named "Required", which checks fields that contain the value​​. You can find it in Sitecore/...
Vlad Iobagiu's user avatar
  • 18.7k
7 votes

How do i validate an image for byte-size in Content Editor?

The setting Well there isn't really a built in validator for this; although you could build one. But you can - generally - restrict the size of media in your solution. It is controlled via this ...
Mark Cassidy's user avatar
  • 25.3k
7 votes
Accepted

Validation Errors Not Showing Up in Experience Editor

Apparently there's a checkbox.
Ben Lipson's user avatar
  • 1,382
7 votes

Special Characters and Spaces in Display Name

Following up on Mark's answer, if you wanted to do just use a regex you could use the following steps: Go to /sitecore/system/Settings/Validation Rules/Field Rules/ Create a folder called Custom ...
Teeknow's user avatar
  • 2,477
7 votes
Accepted

Make one of two sitecore content fields required?

I would recommend implementing a custom Item validation rule. Note: This is different from a field validation, in that it validates the entire item instead of a single field. 1. Create custom ...
Dan Sinclair's user avatar
  • 5,425
7 votes

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

Add "using Microsoft.Extensions.DependencyInjection" to your usings should solve it. I had the same problem and VS didn't added it automatically.
Najem's user avatar
  • 107
6 votes
Accepted

Sitecore Field Validator Change to Custom Message

OOTB, you cannot change this message because this is present in the Sitecore Kernel dll. Please see screenshot below: In order to change this message, you will need to override the validators ...
Hishaam Namooya's user avatar
6 votes

Item validator access already stored data instead of newly inputed data

So one thing to note - CriticalError - the user is warned before saving, but the data is still saved. FatalError will stop the item from being saved if validation fails. But... What you are trying ...
Richard Seal's user avatar
  • 20.6k
6 votes

Special Characters and Spaces in Display Name

Display Name is a field. As such, you can enforce its value using normal Sitecore validation and workflow tools. I am by no means a specialist in writing RegEx expressions, but I'm pretty sure you ...
Mark Cassidy's user avatar
  • 25.3k
6 votes

How to implement character limit validation on Single-Line Text and Multi-Line Text fields?

You need just to assign a validation rule to your fields The Sitecore field validators is a set of user-input validators that can be applied to either an item, a specific field type or a specific ...
Vlad Iobagiu's user avatar
  • 18.7k
6 votes
Accepted

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

Sitecore Support has determined that this is a bug, public reference number 221523. While previously it was necessary to contact Sitecore Support if you ran into this issue, Sitecore's Knowledge Base ...
James Skemp's user avatar
  • 1,398
5 votes
Accepted

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

You can remove the rule validation on the Global Rules item /sitecore/system/Settings/Validation Rules/Global Rules You'll want to remove the rule from the Validate Button, and Validate Button fields ...
Patrick Barron's user avatar
4 votes

Validation Errors Not Showing Up in Experience Editor

There may be different reasons for this behavior. Suppressed validation rules Open the Content Editor. In the ribbon tab "View", make sure that the "Standard fields" checkbox is checked. Open the ...
Dmytro Shevchenko's user avatar
4 votes
Accepted

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

You can pretty much reuse the first regex, just instead of saying that you need 0-5 guids, you should say that you need 0 or more groups of 2 guids: ^({[^}]+}[|]{[^}]+}[|]?)*$ So in fact you use ...
Marek Musielak's user avatar
  • 24.1k
4 votes

Field level Validation Rule => "OnSave"?

you missed to add Parameters on your validator Parameters are applied using a QueryString-like list like this: [parameter]=[value]&[parameter]=[value] The “Result” paremeter determines the ...
Vlad Iobagiu's user avatar
  • 18.7k
4 votes
Accepted

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

You need to add a reference Microsoft.Extensions.DependencyInjection.Abstractions.dll to your project. It's not enough to have Microsoft.Extensions.DependencyInjection.dll referenced only.
Marek Musielak's user avatar
  • 24.1k
4 votes
Accepted

How to prevent an item from being moved to another folder accidentally?

There is nothing like that out of the box in Sitecore. But you can easily create such a functionality on your own: Create a new template with one field only - checkbox "Cannot be moved" Add your ...
Marek Musielak's user avatar
  • 24.1k
4 votes
Accepted

Dynamic DataSource for Droplist in Content Editor

It is possible via both a custom field implementation or field validation. Below is the code for both ways. Solution 1 - A Custom Validation You should implement a class which will extend the ...
Hishaam Namooya's user avatar
4 votes

Dynamic DataSource for Droplist in Content Editor

You can specify custom logic to resolve the source of the field using a code: declaration and setting it to your custom Class. Include a reference to Sitecore.Buckets.dll and create a class which ...
jammykam's user avatar
  • 13.9k
3 votes

Field level Validation Rule => "OnSave"?

As well as using a rules engine based validator, there are also validation fields on the Field template that you can use: The Validation field takes a regex and the ValidationText field can be used ...
Richard Seal's user avatar
  • 20.6k
3 votes
Accepted

Disable validation in WFFM forms, if required fields are in hidden mode

Currently in WFFM, this is not possible without custom JavaScript. You will need to disable validation on the fields you want to validate. Then write custom client side validation when the field is ...
C Sigmon's user avatar
  • 421
3 votes

The constructor to deserialize an object of type is not found

As mentioned in the comments, the constructors are mandatory. You are inheriting from StandardValidator which ultimately inherits from a class implementing ISerializable. On this we know: The ...
Mark Cassidy's user avatar
  • 25.3k
3 votes
Accepted

How do i validate an image for byte-size in Content Editor?

As Mark Cassidy explained, you can only achieve this via the implementation of a custom validation rule. Please see below the code for the custom validation. [Serializable] public class ...
Hishaam Namooya's user avatar
3 votes
Accepted

Markup button under proofing tab is not working in preview mode

When you click the "Markup" button, what should happen is that the page sitecore/shell/Applications/Content Manager/Validator.aspx should pop up and all Rich-Text content stored in fields that live on ...
Zachary Kniebel's user avatar
3 votes
Accepted

"Linked Item Has Allowed Template" Field Validation XP 8.2

“Linked Item Has Allowed Template” Field Validator is working as expected for Droptree field. You need to add DataSource=/sitecore/content/Home&IncludeTemplatesForSelection=Template Name in Source ...
Siva Kumar's user avatar
3 votes

Allow all characters in ItemNameValidation setting

There are 2 settings that control item names during package installation: InvalidItemNameChars should be blank. ItemNameValidation should be .* With this settings you should be able to install ...
Anton's user avatar
  • 3,831

Only top scored, non community-wiki answers of a minimum length are eligible