Coder Social home page Coder Social logo

Comments (7)

bo2337285 avatar bo2337285 commented on May 21, 2024 10

这个trigger其实并不是async-validator文档中rule的属性,只是ui组件框架Form组件里自己定义的一个属性而已
所以像iview的Form组件里头的什么tigger:'blur/change'都是他自己定义并且触发的,但他并没有说出来(所以说这是iview文档的锅@iview)
不过也不是没有解决办法,其实像iview的Form组件,是有针对某个表单字段进行校验的方法,Form.validateField(),自己调一下触发即可
好好看文档吧...

from async-validator.

gooqiao avatar gooqiao commented on May 21, 2024 3

自己定义一个就好

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.

chenyanfa729 avatar chenyanfa729 commented on May 21, 2024

同问

from async-validator.

VYuLinLin avatar VYuLinLin commented on May 21, 2024

同问??

from async-validator.

jimyuan avatar jimyuan commented on May 21, 2024

+1啊,没人回答?

from async-validator.

anchorgoogle avatar anchorgoogle commented on May 21, 2024

同求,如果没有支持自定义,就要很麻烦的hack了

from async-validator.

aprilxiaomei avatar aprilxiaomei commented on May 21, 2024

+1 同求啊,迫切需要次功能

from async-validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.