如何更改kendo错误消息?我的模特是
UIHint("Time")]
[Required(ErrorMessage = "* required")]
public DateTime SchoolEndTime { get; set; }
我想更改错误消息'字段SchoolStartTime必须是日期。“但我想更改为'无效时间'
答案 0 :(得分:1)
[Required(ErrorMessage = "* required")]
[Display(Name = "School End Time ")]
public DateTime SchoolEndTime { get; set; }
显示属性更改错误消息为“学校结束时间必须是日期”而不是“SchoolEndTime必须是日期”
或
您可以更改验证器设置
<span id="createdValidator">
//grid code
<span class="k-invalid-msg" data-for="Created"></span>
</span>
$("#createdValidator").kendoValidator({
messages: {
date: "Invalid time. Use: mm/dd/yyyy" //Here is your message
}
});