コード例 #1
0
 public static IRuleBuilderOptions <T, string> MustBeValidLanguageCode <T>(this IRuleBuilder <T, string> ruleBuilder)
 {
     return(ruleBuilder.Must(lc => LanguageCode.IsValid(lc))
            .WithMessage("Must be a valid IETF BCP 47 language tag, where the shortest form should be preferred when available. For example: en."));
 }