IvrDtoValidator.cs 356 B

1234567891011121314
  1. using FluentValidation;
  2. using Hotline.Share.Dtos.CallCenter;
  3. namespace Hotline.Validators.CallCenter
  4. {
  5. public class IvrDtoValidator : AbstractValidator<IvrDto>
  6. {
  7. public IvrDtoValidator()
  8. {
  9. RuleFor(d => d.Exit)
  10. .Must(d => !d.EndsWith('T')).Unless(d => string.IsNullOrEmpty(d.Exit));
  11. }
  12. }
  13. }