using FluentValidation;
using GreenTree.Nachtragsmanagement.Web.Models.Config;
using GreenTree.Nachtragsmanagement.Web.Models.Deviation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GreenTree.Nachtragsmanagement.Web.Validation.Config
{
    public class ConfigItemDataModelValidator : AbstractValidator<ConfigItemDataModel>
    {
        public ConfigItemDataModelValidator()
        {
            RuleFor(m => m.Name)
                .NotEmpty()
                    .WithMessage("Ein Name wird benötigt");

            RuleFor(m => m.TypeFullName)
                .NotEmpty()
                    .WithMessage("Der Wertetyp wird benötigt");
        }
    }
}