using FluentValidation;
using XF.Domain.Extensions;

namespace Hotline.Application.Contracts.Validators;

public static class ValidatorExtensions
{
    /// <summary>
    /// Guid结构的字符串
    /// </summary>
    public static IRuleBuilderOptions<TDto, string> IsGuidStructureString<TDto>(this IRuleBuilderInitial<TDto, string> initial) =>
        initial.Cascade(CascadeMode.Stop).NotEmpty().Must(d => d.IsGuidString());
}