Class EditorValidator<T>
Provides a base class for IEditorValidator implementations.
Inheritance
object
Namespace: Umbraco.Cms.Core.Editors
Assembly: Umbraco.Core.dll
Syntax
public abstract class EditorValidator<T> : IEditorValidator, IDiscoverable
Type Parameters
| Name | Description |
|---|---|
| T | The validated object type. |
Constructors
View SourceEditorValidator()
Declaration
protected EditorValidator()
Properties
View SourceModelType
Gets the object type validated by this validator.
Declaration
public Type ModelType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Methods
View SourceValidate(object)
Validates an object.
Declaration
public IEnumerable<ValidationResult> Validate(object model)
Parameters
| Type | Name | Description |
|---|---|---|
| object | model |
Returns
| Type | Description |
|---|---|
| IEnumerable<ValidationResult> |
Validate(T)
Validates the specified model instance.
Declaration
protected abstract IEnumerable<ValidationResult> Validate(T model)
Parameters
| Type | Name | Description |
|---|---|---|
| T | model | The strongly-typed model to validate. |
Returns
| Type | Description |
|---|---|
| IEnumerable<ValidationResult> | A collection of validation results indicating any validation failures. |