ValidationResultExtensions
Assembly: ServiceStack.dll
View Source
Declaration
public static class ValidationResultExtensions
Methods
ToErrorResult(ValidationResult)
Converts the validation result to an error result which will be serialized by ServiceStack in a clean and human-readable way.
View Source
Declaration
public static ValidationErrorResult ToErrorResult(this ValidationResult result)
Returns
ServiceStack.Validation.ValidationErrorResult
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.FluentValidation.Results.ValidationResult | result | The validation result |
|
ToException(ValidationResult)
Converts the validation result to an error exception which will be serialized by ServiceStack in a clean and human-readable way if the returned exception is thrown.
View Source
Declaration
public static ValidationError ToException(this ValidationResult result)
Returns
ServiceStack.Validation.ValidationError
Parameters
Type | Name | Description |
---|---|---|
ServiceStack.FluentValidation.Results.ValidationResult | result | The validation result |
|