Comments (4)
Must be an instance of RegExp or a string that does not generate an exception when creating a new RegExp
应该是缺少Pattern,试试这样:
{type:'regexp',required:true,message: '请输入正则表达式', trigger: 'blur', pattern: /\w+/g}
from async-validator.
@jruif
type要改成 string才有效果
{type:'string',required:true,message: '请输入正则表达式', trigger: 'blur', pattern: /\w+/g}
from async-validator.
[{ pattern: /^\d+$/, required: true, message: 'pattern这个字段就够了' }]
from async-validator.
望文生义了。。原来 regexp是验证输入的内容是否是正则表达式
from async-validator.
Related Issues (20)
- Syntax Error : Unexpected token
- 控制台打印错误信息 ["请输入${label}"] HOT 1
- [Component] [el-select] View multiple el-select with collapse-tags when first element is very long.
- v4.2.5 transform won't give the transformed data when transform is not used on top-level rules HOT 1
- 当rule为pattern,value为undefined时校验可以通过 HOT 1
- 多层嵌套对象验证规则怎么写? HOT 3
- Async Validation Error HOT 2
- 数组的判断一直提示 xxx is not an array HOT 1
- Re-export AsyncValidationError in the build result
- I can't create a asyncfiled HOT 2
- validator.validate catch 回调中通过单个形参取值会报错 HOT 1
- beforeCreate里面为data新增属性不是响应式
- how to use it in Vitest
- el-form绑定数据源时v-model和:model都能绑定到值,但是前者无法通过rules HOT 1
- Label for error message
- Using debouncedRequest in validator HOT 1
- url validation is passed for values without protocol at the beginning but with www. HOT 2
- 如何将error message里面的特殊字符加载出来,例如空格或者
- REDOS in src/rule/url.ts
- transform 直接返回 value 交互不一致 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-validator.