Exemple #1
0
 public Rule GeneratorFrom(IPropertyValidator propertyValidator)
 {
     var rule = new Regex
     {
         Message = propertyValidator.ErrorMessageSource.GetString(),
         Expression = ((IRegularExpressionValidator)propertyValidator).Expression
     };
     return rule;
 }
Exemple #2
0
 public Rule GeneratorFrom(string propertyName, IPropertyValidator propertyValidator)
 {
     var rule = new Regex
     {
         Message = propertyValidator.GetErrorMessageFor(propertyName),
         Expression = ((IRegularExpressionValidator)propertyValidator).Expression
     };
     return rule;
 }