gpt4 book ai didi

javascript - 手掌。获取所有验证错误的列表

转载 作者:行者123 更新时间:2023-11-29 22:02:20 28 4
gpt4 key购买 nike

我想知道是否可以在提交数据之前在 handsontable 中获取所有验证错误的列表?

谢谢!

最佳答案

为afterValidate事件添加监听器
http://handsontable.com/demo/validation.html
更多在这里
https://github.com/warpech/jquery-handsontable/wiki/Events
afterValidate (isValid: Boolean, value: Mixed, row: Number, prop: String, source: String)

在此之后,您可以在处理函数中编写 JQuery 选择器来提取错误数据。

根据要求更新

好吧,你像这样附加事件监听器,然后 according to documentation

$('#your-handsontable-id').on('afterValidate', function(result){
if(!result.isValid){
alert('Take your pants off cause we have a problem boy! - value - '+ result.value +' row -' + result.row +' prop -' + result.prop+ +' source-'+result.source);
}
});

关于javascript - 手掌。获取所有验证错误的列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22943470/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com