Search code examples
reactjsreduxredux-form

Redux-form validation of several tabs


I have several tabs with redux-form fields. Of course, I have a validator, that have to validate just active tab. But there's a little problem. When I change active tab, validator checks fields value just if I try to do anything (click on any fields for example).
The question is How can I pass formProps to validator when I change active tab?


Solution

  • A have a similar app working fine here. I followed "Wizard Form" strategy (http://redux-form.com/6.3.1/examples/wizard/), using 1 form per tab, all using the same form name. Make sure you render just the body/form of the active tab, and don't submit when changing tabs.