private static IStringAssertion IsValidISBN10(this IStringAssertionU source) { source.Extend(x => { return(AssertResult.New(ValidIsbn10(x), Resources.IsValidISBN)); }); return((IStringAssertion)source); }
public static IStringAssertion IsValidPersonalNumber(this IStringAssertionU source) { source.Extend(x => { return(AssertResult.New(Luhn.IsValid(x.ToIntArray()), Resources.IsValidPersonalNumber)); }); return((IStringAssertion)source); }
public static IStringAssertion IsValidSocialSecurityNumber(this IStringAssertionU source) { source.Extend(x => { var isValid = Regex.IsMatch(x, _regex); return(AssertResult.New(isValid, Resources.IsValidSocialSecurityNumber)); }); return((IStringAssertion)source); }
public static IStringAssertion IsNotValidImoNr(this IStringAssertionU source) { source.Extend(x => { return(AssertResult.New(!ImoValidator.IsValid(x), Resources.IsNotValidImoNr)); }); return((IStringAssertion)source); }
public static IStringAssertion IsValidZipCode(this IStringAssertionU source) { source.Extend(x => { var isValid = Regex.IsMatch(x, _regex); return(AssertResult.New(isValid, Resources.IsValidZipCode)); }); return((IStringAssertion)source); }
public static IStringAssertion IsNotValidPhoneNumber(this IStringAssertionU source) { source.Extend(x => { var isValid = Regex.IsMatch(x, _regex); return(AssertResult.New(!isValid, Resources.IsNotValidPhoneNumber)); }); return((IStringAssertion)source); }