Class MatchAttribute
Ensures that the string representation of a parameter or property matches the given pattern.
Inheritance
MatchAttribute
Assembly: Solti.Utils.Rpc.Interfaces.dll
Syntax
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class MatchAttribute : ValidatorAttributeBase, IConditionalValidatior, IParameterValidator, IPropertyValidator, ICustomValidator
Constructors
MatchAttribute(String, RegexOptions)
Declaration
public MatchAttribute(string pattern, RegexOptions options = RegexOptions.Compiled)
Parameters
Properties
ParameterValidationErrorMessage
The message that is thrown when the match was not successful.
Declaration
public string ParameterValidationErrorMessage { get; set; }
Property Value
PropertyValidationErrorMessage
The message that is thrown when the match was not successful.
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 _)
Parameters
IPropertyValidator.Validate(PropertyInfo, Object, IInjector)
Declaration
void IPropertyValidator.Validate(PropertyInfo prop, object value, IInjector _)
Parameters
Type |
Name |
Description |
PropertyInfo |
prop |
|
Object |
value |
|
Solti.Utils.DI.Interfaces.IInjector |
_ |
|
Implements