using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace RIAPoweredSilverlightApplication.Web.Validation
{
    public class ProductCategoryValidator
    {
        public static ValidationResult ProductCategoryNameValid(string name, ValidationContext context)
        {
            if (name.EndsWith("mod"))
            {
                return new ValidationResult("Category Name should not ends with \"mod\"");
            }
            else
            {
                return null;
            }
        }
    }
}