16 lines
374 B
C#
16 lines
374 B
C#
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());
|
|
}
|
|
}
|
|
} |