16 lines
373 B
C#
16 lines
373 B
C#
using FluentValidation;
|
|
using Finch.Security;
|
|
|
|
namespace Finch.Validation;
|
|
|
|
public static partial class ValidatorExtensions
|
|
{
|
|
/// <summary>
|
|
/// Validates a captcha token
|
|
/// </summary>
|
|
public static IRuleBuilderOptions<T, string> Captcha<T>(this IRuleBuilder<T, string> ruleBuilder)
|
|
{
|
|
return ruleBuilder.SetAsyncValidator(new CaptchaValidator<T>());
|
|
}
|
|
}
|