Files
Umbraco-CMS/src/Umbraco.Web/Editors/IEditorValidator.cs
2018-03-16 09:11:59 +01:00

37 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Umbraco.Core.Composing;
namespace Umbraco.Web.Editors
{
// 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
// the whole thing is internal at the moment, never released
// and, there are no IEditorValidator implementation in Core
// so... this all mechanism is basically useless
/// <summary>
/// Provides a general object validator.
/// </summary>
internal interface IEditorValidator : IDiscoverable
{
/// <summary>
/// Gets the object type validated by this validator.
/// </summary>
Type ModelType { get; }
/// <summary>
/// Validates an object.
/// </summary>
IEnumerable<ValidationResult> Validate(object model);
}
}