ValidateRequestAttribute
Assert pre-conditions before DTO's Fluent Validation properties are evaluated
Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
[Tag("PropertyOrder")]
public class ValidateRequestAttribute : AttributeBase, _Attribute, IValidateRule, IReflectAttributeConverter
Properties
Validator
Script Expression to create an IPropertyValidator registered in Validators.Types
View Source
Declaration
public string Validator { get; set; }
Condition
Boolean #Script Code Expression to Test ARGS:
- Request: IRequest
dto: Request DTO
it: Request DTO
View Source
Declaration
public string Condition { get; set; }
Conditions
Combine multiple conditions
View Source
Declaration
public string[] Conditions { get; set; }
ErrorCode
Custom ErrorCode to return
View Source
Declaration
public string ErrorCode { get; set; }
Message
Custom Error Message to return
- {PropertyName}
- {PropertyValue}
View Source
Declaration
public string Message { get; set; }
StatusCode
Custom Status Code to return when invalid
View Source
Declaration
public int StatusCode { get; set; }
AllConditions
View Source
Declaration
public string[] AllConditions { get; set; }
AnyConditions
View Source
Declaration
public string[] AnyConditions { get; set; }
Methods
ToReflectAttribute()
View Source
Declaration
public ReflectAttribute ToReflectAttribute()
Returns
Implements
System.Runtime.InteropServices._Attribute
- ServiceStack.IValidateRule
- ServiceStack.IReflectAttributeConverter