Add ability to fix errors during import
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user