ParameterValidationAttribute Class
A base class attribute used for parameter validation.
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
public abstract class ParameterValidationAttribute : Attribute
- Namespace
- Spectre
.Console .Cli - Base Types
-
- Attribute
Attributes
-
Attribute
Usage Attribute
Constructors
-
protected Parameter
Validation Attribute (string) -
Initializes a new instance of the
ParameterValidationAttribute
class.
Properties
- string ErrorMessage
- Gets the validation error message.
Methods
-
abstract ValidationResult Validate
( Command Parameter Context) - Validates the parameter value.