RegularExpression(@"^\d{1,15}$")]
を使用して、私は、ユーザーがアップし、エラーメッセージを返す長さ15に数字を入力したい、これは正しくない場合の連絡先番号は15桁まで入力してください。 '正規表現のエラーメッセージ
[Required(ErrorMessage = ("Please enter up to 15 digits for a contact number")), Display(Name = "Contact Number"), RegularExpression(@"^\d{1,15}$")]
public string ContactNumber { get; set; }
:
The field Contact Number must match the regular expression '^\d{1,15}$'.
代わり'Please enter up to 15 digits for a contact number'
の...誰もがなぜ知っているのですか? ありがとう
助けを借りてくれてありがとう – John