Class LengthBetweenAttribute
Ensures that the string representation of a parameter or property matches the given pattern.
Inheritance
LengthBetweenAttribute
Assembly: Solti.Utils.Rpc.Interfaces.dll
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class LengthBetweenAttribute : ValidatorAttributeBase, IConditionalValidatior, IParameterValidator, IPropertyValidator, ICustomValidator
Constructors
LengthBetweenAttribute(Int32, Int32)
Declaration
public LengthBetweenAttribute(int min = 0, int max = 2147483647)
Parameters
Properties
Max
The maximum length of the value.
Declaration
Property Value
Min
The minimum length of the value.
Declaration
Property Value
ParameterValidationErrorMessage
Declaration
public string ParameterValidationErrorMessage { get; set; }
Property Value
PropertyValidationErrorMessage
Declaration
public string PropertyValidationErrorMessage { get; set; }
Property Value
Explicit Interface Implementations
IParameterValidator.Validate(ParameterInfo, Object, IInjector)
Declaration
void IParameterValidator.Validate(ParameterInfo param, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
ParameterInfo |
param |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
IPropertyValidator.Validate(PropertyInfo, Object, IInjector)
Declaration
void IPropertyValidator.Validate(PropertyInfo prop, object value, IInjector currentScope)
Parameters
Type |
Name |
Description |
PropertyInfo |
prop |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
currentScope |
|
Implements