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

namespace GreenTree.Nachtragsmanagement.Web.Validation.Deviation
{
    public class DisturbanceDataModelValidator : AbstractValidator<DisturbanceDataModel>
    {
        public DisturbanceDataModelValidator()
        {
            RuleFor(m => m.Description)
                .NotEmpty()
                    .WithMessage("Beschreibung wird benötigt")
                .MaximumLength(50)
                    .WithMessage("Muss unter 50 Zeichen sein");
        }
    }
}