MVC十进制?增量验证

时间:2015-06-15 08:14:49

标签: c# asp.net-mvc-4 model-validation

除了为小数添加范围外,还可以吗?应用增量,例如只能将100整除为真?

[Required(ErrorMessage = "Amount is Required")]
[Range(1000, 25000, ErrorMessage = "Loan must be between 1000 and 25000")]
[DisplayName("Amount")]
public decimal? amount { get; set; }

非常感谢任何帮助: - )

0 个答案:

没有答案