读书人

ext js 表单验证异常信息急救

发布时间: 2012-09-16 17:33:16 作者: rapoo

ext js 表单验证错误信息急救。
Label: The value in this field is too big!
//自己定义一个校验器
this.feeTx.validator = this.validatePriceFun;
//校验器函数
validatePriceFun : function(value)
{
if(value>validateTotalValue){
return 'The value in this field is too big!';
}
else{
return true;
}
}
照理说:校验之后显示的信息应该是
The value in this field is too big!
但真实显示的是
Label: The value in this field is too big!
为什么会多个Label: 求解!

[解决办法]
你把return的返回值换个其他的,看看是不是还是显示“Label: The value in this field is too big!”
这样的话说明你的返回值没有用到吗!
[解决办法]
呵呵~默有加label的。。但是可以override掉的。想返回什麽格式都可以。
[解决办法]
汗颜,,,上代码不上全。。

读书人网 >JavaScript

热点推荐