IValidator
Defines a validator for a particular type.
Assembly: ServiceStack.dll
View Source
Declaration
public interface IValidator
Methods
Validate(IValidationContext)
Validates the specified instance.
View Source
Declaration
ValidationResult Validate(IValidationContext context)
Returns
ServiceStack.FluentValidation.Results.ValidationResult: A ValidationResult object contains any validation failures.
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.FluentValidation.IValidationContext | context | A ValidationContext |
|
ValidateAsync(IValidationContext, CancellationToken)
Validates the specified instance asynchronously.
View Source
Declaration
Task<ValidationResult> ValidateAsync(IValidationContext context, CancellationToken cancellation = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.FluentValidation.Results.ValidationResult>
: A ValidationResult object contains any validation failures.
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.FluentValidation.IValidationContext | context | A ValidationContext |
|
| System.Threading.CancellationToken
| cancellation | Cancellation token
|
CreateDescriptor()
Creates a hook to access various meta data properties
View Source
Declaration
IValidatorDescriptor CreateDescriptor()
Returns
ServiceStack.FluentValidation.IValidatorDescriptor: A IValidatorDescriptor object which contains methods to access metadata
CanValidateInstancesOfType(Type)
Checks to see whether the validator can validate objects of the specified type
View Source
Declaration
bool CanValidateInstancesOfType(Type type)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Type | type |