using FluentValidation;
using Hotline.Share.Dtos.CallCenter;

namespace Hotline.Validators.CallCenter
{
    public class IvrDtoValidator : AbstractValidator<IvrDto>
    {
        public IvrDtoValidator()
        {
            RuleFor(d => d.Exit)
                .Must(d => !d.EndsWith('T')).Unless(d => string.IsNullOrEmpty(d.Exit));
        }
    }
}
