Skip to main content

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
TypeNameDescription
ServiceStack.FluentValidation.Results.ValidationResultresultThe 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
TypeNameDescription
ServiceStack.FluentValidation.Results.ValidationResultresultThe validation result

|