常用的正则校验
摘要:1. 最多输入两位小数的校验 const pointExp = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/ if (!pointExp.test(value)) { return callback(new Error("最多输入
阅读全文
posted @
2022-07-29 16:40
鄢宁
阅读(63)
推荐(0) 编辑
保留N位小数(不四舍五入)的
摘要:util.pointDecimal=function(value,num) { if(value null||value undefined||value==NaN){ return "0.00"; } value = value+""; value = parseFloat(value.repla
阅读全文
posted @
2022-07-27 14:14
鄢宁
阅读(18)
推荐(0) 编辑