回答

5

1)[StringLength(10, MinimumLength = 10)]

2)[RegularExpression(@"(.{10})")]

3

嘗試

[StringLength(10, MinimumLength = 10, ErrorMessage = "This field must be 10 characters")] 
public string myString {get;set;} 
相關問題