13

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.


10

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 approach to disable saving item when field is empty. This will force content editors to fill in field values before saving and proceeding to next step of workflow. ...


9

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 but it is there... :) Update In Sitecore 8.2 update 1 it is fixed and they show you the validator bar for all invalid fields.


8

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/System/Settings/Validation Rules/Field Rules. Please, configure the workflow and validation rules for your template, in this way: In the "master" database open ...


8

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 is the validator on the Image items in the media library.


7

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 setting: <setting name="Media.MaxSizeInDatabase" value="500MB" /> Setting it to 1MB would restrict your content authors from uploading ...


7

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 Create an item called Is Valid Display Name based on the template /sitecore/templates/System/Validation/Validation Rule Set the field appropriately. Type should be ...


7

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 validator Create a new class that implements the Sitecore.Data.Validators.StandardValidator base class. In the Evaluate() method, get both fields and check to see ...


6

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 can arrive at what you need by setting one such validator up for your Display Name field. It will only work on new changes however; the content your authors have ...


6

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 to do is not possible in a validator. The this.GetItem() method in the base validator, gets the item from the database. Remember that a validator works on a ...


6

Apparently there's a checkbox.


6

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 field on a specific item. Sitecore comes with a set of standard validators, including broken links validation, email validators, max length validators and XHTML/...


5

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 of the item. Update There are field specific rule items that you can update to remove the Is XHtml if needed. The Rich Text field is located at /sitecore/...


5

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 has an article covering this issue, with the necessary hotfix. This issue is resolved in 9.1.


4

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 default result value of a validation. Possible values are: Valid = Green, everything is fine Suggestion = Bright Orange, hmm, take a look at this Warning = ...


4

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 __Standard Values item of the template used by the item. Find the field "Suppressed validation rules" in the section "Validation Rules". Clear the value of the ...


4

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 pipeline <processor mode="on" type="Sitecore.Pipelines.Save.Validators, Sitecore.Kernel"/> So, it will be something as below: public class CustomValidators { ...


4

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 handler to <event name="item:moving"/> In the handler code cancel the event if the checkbox is checked. I haven't tested the code but something like this ...


4

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 StandardValidator. The code snippet is provided below to create a custom validation for the droplist. [Serializable] public class UserValidation : StandardValidator {...


3

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 for the warning text. Using the following regex: /^.{8,}$/ That makes sure that the content has a minimum length of 8 characters. Now when the content editor ...


3

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 regex which says: I want a guid {[^}]+} a pipe | and another guid {[^}]+} then maybe pipe |? Everything is wrapped with ( and )* so you say that you want 0 ...


3

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 visible.


3

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 (may be different from those that display on) the page item that you are previewing will be displayed and their markup validated. This means that if you're ...


3

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 ImageWeightDynamicValidator : StandardValidator { public int Weight; public override string Name { get { return "...


3

“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 field. Note: IncludeTemplatesForSelection should be equal to Template Name without double quotes.


3

Add "using Microsoft.Extensions.DependencyInjection" to your usings should solve it. I had the same problem and VS didn't added it automatically.


3

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.


3

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 implements IDataSource: using System.Linq; using Sitecore.Data.Items; namespace Sitecore.Sharedsource.Data.FieldSources { public class CustomFieldDataSource :...


2

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 have access rights to the rules or something else required for this functionality. It's possible that your users are slightly different or that the security set on ...


2

You haven't said which version of Sitecore / WFFM you are using but you should be able to create a custom field validator to validate the date like so (obviously you would need to add your own logic here): public class DateInFutureValidator : FormCustomValidator { public DateInFutureValidator() { this.ServerValidate += this.OnDateValidate; } ...


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