首页 文章

BreezeJS错误消息为maxLength

提问于
浏览
0

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

'subject'必须是少于100个字符的字符串 .

它应该是:

'subject'必须是少于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"
};

1 回答

  • 0

    感谢您让我们知道!

    我们已修复它,您将在下一个版本中看到修复程序 .

相关问题