表单校验几个细节问题

This commit is contained in:
Chopper
2021-10-19 14:20:20 +08:00
parent 7cbd2b698c
commit 31d9859f10
6 changed files with 42 additions and 23 deletions

View File

@@ -62,10 +62,14 @@ export const TEL = /0\d{2,3}-\d{7,8}/
// 正整数
export const INTEGER = {
pattern: /^[0-9]\d{0,10}|0$/,
message:'请输入正整数'
pattern: /^[0-9]\d{0,10}|0$/,
message:'请输入正整数'
}
// 正整数
export const NUMBER = {
pattern: /^(\-|\+)?\d{0,10}$/,
message:'请输入数字'
}
export const VARCHAR5 = {
pattern:/^.{1,5}$/,
message:'长度应该限制在1-5个字符'