Files
Umbraco-CMS/src/Umbraco.Web/Editors/IEditorValidator.cs

35 lines
1.0 KiB
C#
Raw Normal View History

2017-07-20 11:21:28 +02:00
using System;
2016-01-20 17:42:09 +01:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
2017-05-30 15:56:27 +02:00
using Umbraco.Core.Composing;
namespace Umbraco.Web.Editors
{
2018-03-16 09:06:44 +01:00
// note - about IEditorValidator
//
// interface: IEditorValidator
// base class: EditorValidator<T>
// static validation: EditorValidator.Validate()
// composition: via EditorValidationCollection and builder
// initialized with all IEditorValidator instances
//
// validation is used exclusively in ContentTypeControllerBase
2019-10-29 11:02:18 +11:00
// currently the only implementations are for Models Builder.
2018-03-16 09:06:44 +01:00
/// <summary>
/// Provides a general object validator.
/// </summary>
public interface IEditorValidator : IDiscoverable
{
2018-03-16 09:06:44 +01:00
/// <summary>
/// Gets the object type validated by this validator.
/// </summary>
Type ModelType { get; }
2018-03-16 09:06:44 +01:00
/// <summary>
/// Validates an object.
/// </summary>
2016-01-20 17:42:09 +01:00
IEnumerable<ValidationResult> Validate(object model);
}
2017-07-20 11:21:28 +02:00
}