Files
Umbraco-CMS/src/Umbraco.Web/PropertyEditors/IntegerPropertyEditor.cs

21 lines
658 B
C#

using Umbraco.Core;
using Umbraco.Core.PropertyEditors;
namespace Umbraco.Web.PropertyEditors
{
[PropertyEditor(Constants.PropertyEditors.IntegerAlias, "Numeric", "integer", IsParameterEditor = true)]
public class IntegerPropertyEditor : PropertyEditor
{
/// <summary>
/// Overridden to ensure that the value is validated
/// </summary>
/// <returns></returns>
protected override PropertyValueEditor CreateValueEditor()
{
var editor = base.CreateValueEditor();
editor.Validators.Add(new IntegerValidator());
return editor;
}
}
}