Beispiel #1
0
 public override IRuleBuilderOptions <TContainer, string> Validate <TContainer>(IRuleBuilderOptions <TContainer, string> builder)
 {
     return(builder.Matches(@"^\d{4}$").WithLocalizedMessage(() => Messages.PaymentCodeFormat));
 }
Beispiel #2
0
 public override IRuleBuilderOptions <TContainer, string> Validate <TContainer>(IRuleBuilderOptions <TContainer, string> builder)
 {
     return(builder.Matches(@"^\+375 *\(?(29|33|44|25)\)? *\d{7}$").WithLocalizedMessage(() => Messages.CheckNumberPhone));
 }
Beispiel #3
0
 public override IRuleBuilderOptions <TContainer, string> Validate <TContainer>(IRuleBuilderOptions <TContainer, string> builder)
 {
     return(builder.Matches(@"^\d{9}$").WithLocalizedMessage(() => Messages.BankCodeFormat)
            .Must(BankExists).WithLocalizedMessage(() => Messages.BankCodeInvalid));
 }