【问题标题】:Kendo UI Grid custom validation messageKendo UI Grid 自定义验证消息
【发布时间】:2016-03-24 08:52:03
【问题描述】:

Here is an example of working custom validation, but without an error message. 要对其进行测试,请将“最低”的值设置为高于或等于该行的“最高”值。

我需要的功能已经在工作,我只是不知道如何在 Kendo UI Grid 中为我的自定义验证器设置自定义错误消息。

我发现的每个示例都没有自定义消息使用类似以下的构造,不起作用,至少据我所知不再是:

{
  validation: {
    rules: {
      myCustomValidator: ...
    },
    messages: {
      myCustomValidator: 'My custom error message'
    }
  }
}

有什么想法吗?

【问题讨论】:

    标签: javascript kendo-ui kendo-grid kendo-validator


    【解决方案1】:

    添加验证消息作为输入文本的属性“data-lowerThanHighest-msg”的值。你可以这样做:input.attr("data-lowerThanHighest-msg", "Lowest must be lower than Highest");

    查看修改后的演示 here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-24
      • 1970-01-01
      • 1970-01-01
      • 2016-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-12
      相关资源
      最近更新 更多