【问题标题】:BreezeJS wrong message for maxLengthmaxLength 的 BreezeJS 错误消息
【发布时间】:2013-08-30 22:50:18
【问题描述】:

当您为文本字段设置最大长度时,微风会发回不正确的验证消息。我在我的字段上设置了一个最大长度,可以包含 100 个字符。当我超过这个微风时返回以下验证错误:

“主题”必须是少于 100 个字符的字符串。

应该是:

“主题”必须是少于 101 个字符的字符串。

'subject' 必须是不超过 100 个字符的字符串。

问题代码如下:

ctor.messageTemplates = {
    required: "'%displayName%' is required",
    date: "'%displayName%' must be a date",
    string: "'%displayName%' must be a string",
    bool: "'%displayName%' must be a 'true' or 'false' value",
    guid: "'%displayName%' must be a GUID",
    duration: "'%displayName%' must be a ISO8601 duration string, such as 'P3H24M60S'",
    number: "'%displayName%' must be a number",
    integer: "'%displayName%' must be an integer",
    integerRange: "'%displayName%' must be an integer between the values of %minValue% and %maxValue%",
    maxLength: "'%displayName%' must be a string with less than %maxLength% characters",
    stringLength: "'%displayName%' must be a string with between %minLength% and %maxLength% characters"
};

【问题讨论】:

    标签: validation breeze


    【解决方案1】:

    感谢您告诉我们!

    我们已经修复了它,您将在我们的下一个版本中看到修复。

    【讨论】:

      猜你喜欢
      • 2018-12-19
      • 2018-03-21
      • 1970-01-01
      • 1970-01-01
      • 2015-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多