var stop =false;
var reg= /^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$/;
$scope.List.forEach(function (item){
if (!stop) {
if (!reg.test(item.SetValue)) {
$scope.alert('测试','提示')
stop=true;
}
}
})
if (stop) {
return;
}
js forEach 正则校验
最新推荐文章于 2022-11-18 11:09:39 发布