AntD Form form, can the configuration of getFieldDecorator be dynamically modified?

RT
version: 2.13.11

I have a login dialog box, tab switch password login while verification code login
finally export a form field: Form.create () (AppComp)
so both sides must not pass, so I want to update the configuration of getFieldDecorator

Mar.28,2021

of course. The value of required in
rules is bound to tab .
sets the tab to which true .


you can place the form in two tab with only one content area. Switch tab is only used to get the current password login or CAPTCHA login
and then return a different formItem according to this status. So when you click to log in, you will only verify the current corresponding formItem


.

I used the more troublesome method: From.create () two forms
there is actually a good way:

validateFields([fieldNames: string[]], options: object, callback: Function(errors, values))

fieldNames is the item you want to verify

Menu