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.
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 ...
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 ...
user avatar
9 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 ...
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/...
user avatar
  • 17.8k
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 ...
user avatar
  • 24.4k
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 ...
user avatar
  • 2,457
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 ...
user avatar
  • 5,065
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 ...
user avatar
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 ...
user avatar
  • 24.4k
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 ...
user avatar
  • 18.9k
6 votes
Accepted

Validation Errors Not Showing Up in Experience Editor

Apparently there's a checkbox.
user avatar
  • 1,307
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 ...
user avatar
  • 17.8k
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 ...
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 ...
user avatar
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 ...
user avatar
  • 17.8k
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 ...
user avatar
4 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.
user avatar
  • 77
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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
  • 18.9k
3 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 ...
user avatar
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 ...
user avatar
  • 421
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 ...
user avatar
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 ...
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 ...
user avatar
3 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.
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 ...
user avatar
  • 3,386
3 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 ...
user avatar
  • 13.7k
2 votes

Validation Errors Not Showing Up in Experience Editor

Off the top of my head, there are a few reasons why different core databases might cause this issue (assuming there's nothing useful in the logs): The user you're using to access the page doesn't ...
user avatar
  • 1,502

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