有点困惑,我尝试在我的信用卡详细信息和电话中使用 int 数据类型的最大和最小长度,但我不知道如何去做。
[Required(ErrorMessage = "Telephone is required")]
public int Telephone { get; set; }
[Required(ErrorMessage = "Card Type is required")]
[DisplayName("Card Type")]
[StringLength(20)]
public string CardType { get; set; }
[Required(ErrorMessage = "Card Holders Name is required")]
[DisplayName("Card Holders Name")]
[StringLength(160)]
public string CardHoldersName { get; set; }
public int CardNumber { get; set; }
public int CardExpMonth { get; set; }
public int CardExpYear { get; set; }
[ScaffoldColumn(false)]
public decimal Total;