Comments (7)
这个trigger其实并不是async-validator文档中rule的属性,只是ui组件框架Form组件里自己定义的一个属性而已
所以像iview的Form组件里头的什么tigger:'blur/change'都是他自己定义并且触发的,但他并没有说出来(所以说这是iview文档的锅@iview)
不过也不是没有解决办法,其实像iview的Form组件,是有针对某个表单字段进行校验的方法,Form.validateField(),自己调一下触发即可
好好看文档吧...
from async-validator.
自己定义一个就好
import { RuleItem } from "async-validator/dist-types";
export type triggerType = "blur" | "change";
interface RuleItemExtends {
trigger: triggerType;
}
export type RuleItemExt = RuleItemExtends & RuleItem;
export interface Rules {
[field: string]: RuleItemExt | RuleItemExt[];
}
···
from async-validator.
同问
from async-validator.
同问??
from async-validator.
+1啊,没人回答?
from async-validator.
同求,如果没有支持自定义,就要很麻烦的hack了
from async-validator.
+1 同求啊,迫切需要次功能
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.