Commit edc4a55b by chenwq

优化本月二拓门店的输入验证,限制输入范围为0-1000

1 parent 5c1dde0b
...@@ -77,6 +77,10 @@ export const tempRuleFnObj = { ...@@ -77,6 +77,10 @@ export const tempRuleFnObj = {
/** 本月二拓门店 */ /** 本月二拓门店 */
monthlySecondExpansionStore: { monthlySecondExpansionStore: {
ruleFn: (rule, value) => { ruleFn: (rule, value) => {
const maxValue = 1000
if (value < 0 || value > maxValue) {
return { message: `本月二拓门店请输入0-${maxValue}` }
}
return /^$|^\d{1}$|^[1-9]\d{0,3}$/.test(value) ? null : { message: '本月二拓门店请输入四位数字' } return /^$|^\d{1}$|^[1-9]\d{0,3}$/.test(value) ? null : { message: '本月二拓门店请输入四位数字' }
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!