Files
Umbraco-CMS/src/Umbraco.Web/Editors/EditorValidator.cs
2016-01-20 17:42:09 +01:00

21 lines
514 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Umbraco.Web.Editors
{
internal abstract class EditorValidator<T> : IEditorValidator
{
public Type ModelType
{
get { return typeof (T); }
}
protected abstract IEnumerable<ValidationResult> PerformValidate(T model);
public IEnumerable<ValidationResult> Validate(object model)
{
return PerformValidate((T) model);
}
}
}