mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
17 lines
545 B
C#
17 lines
545 B
C#
namespace CliFx.Extensibility;
|
|
|
|
/// <summary>
|
|
/// Defines a custom validation rules for values bound from command-line arguments.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// To implement your own validator, inherit from <see cref="BindingValidator{T}" /> instead.
|
|
/// </remarks>
|
|
public interface IBindingValidator
|
|
{
|
|
/// <summary>
|
|
/// Validates the value bound to a parameter or an option.
|
|
/// Returns null if validation is successful, or an error in case of failure.
|
|
/// </summary>
|
|
BindingValidationError? Validate(object? value);
|
|
}
|