RegularExpression(@"^\d{1,15}$")]
kullanarak, kullanıcı en fazla hata mesajı döndürür uzunluğunda 15, için tuşlara istediğiniz bu doğru değilse 'bir iletişim numarası için 15 haneye kadar girin'Düzenli ifade hata mesajı
[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}$'.
yerine 'Please enter up to 15 digits for a contact number'
arasında ... herkes neden biliyor? teşekkürler
Yardımcılar için teşekkürler – John