且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Kendo数字文本框范围验证器消息

更新时间:2023-11-28 18:25:34

数据注释:

[Display(Name = "Project Cost")]
[DataType(DataType.Currency)]
[Range(typeof(decimal), "1", "10000", ErrorMessage = "{0} must be between {1:C} and {2:C}")]
public decimal? ProjectCost { get; set; }

剃刀标记:

@Html.Kendo().NumericTextBoxFor(m => m.Equipment.ProjectCost).Min(null).Max(null)