ildar-shaymukhametov_grandnode-refactorings/Grand.Web/Areas/Admin/Validators/Messages/InteractiveFormAttributeValidator.cs
using FluentValidation;
using Grand.Core.Validators;
using Grand.Services.Localization;
using Grand.Web.Areas.Admin.Models.Messages;
using System.Collections.Generic;

namespace Grand.Web.Areas.Admin.Validators.Messages
{
    public class InteractiveFormAttributeValidator : BaseGrandValidator<InteractiveFormAttributeModel>
    {
        public InteractiveFormAttributeValidator(
            IEnumerable<IValidatorConsumer<InteractiveFormAttributeModel>> validators,
            ILocalizationService localizationService)
            : base(validators)
        {
            RuleFor(x => x.Name).NotEmpty().WithMessage(localizationService.GetResource("Admin.Promotions.InteractiveForms.Attribute.Fields.Name.Required"));
            RuleFor(x => x.SystemName).NotEmpty().WithMessage(localizationService.GetResource("Admin.Promotions.InteractiveForms.Attribute.Fields.SystemName.Required"));
        }
    }
}