Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的模型中,我的属性必须是 type 的确切大小integer。
integer
我知道属性Range和MaxLenght,有确切的大小吗?
Range
MaxLenght
谢谢
您可以使用以下[RegularExpression]属性:
[RegularExpression]
[RegularExpression(@"\d{13,13}", ErrorMessage = "You must input exactly 13 digits")] public string SomeValue { get; set; }