Add ability to fix errors during import

This commit is contained in:
2014-02-03 21:16:35 -05:00
parent 3ab80e283a
commit 8b8d82f3d3
8 changed files with 88 additions and 49 deletions
+16
View File
@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using MileageTraker.Web.Models;
using MileageTraker.Web.Utility;
namespace MileageTraker.Web.Attributes
{
public class MileageLogTypeValid : ValidationAttribute
{
public override bool IsValid(object value)
{
if (value == null)
return false;
return typeof (MileageLogType).IsValidValue(value.ToString());
}
}
}