Interface IValueValidator
Defines a value validator.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public interface IValueValidator
Methods
View SourceValidate(object?, string?, object?, PropertyValidationContext)
Validates a value.
Declaration
IEnumerable<ValidationResult> Validate(object? value, string? valueType, object? dataTypeConfiguration, PropertyValidationContext validationContext)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The value to validate. |
| string | valueType | The value type. |
| object | dataTypeConfiguration | A datatype configuration. |
| PropertyValidationContext | validationContext | The context in which the value is being validated. |
Returns
| Type | Description |
|---|---|
| IEnumerable<ValidationResult> | Validation results. |
Remarks
The value can be a string, a Json structure (JObject, JArray...)... corresponding to what was posted by an editor.