gtournie / redux-form-validators

redux-form-validators
152 stars 22 forks source link

Confirmation validator doesn't work in form-section #55

Closed tomcoppensucll closed 5 years ago

tomcoppensucll commented 5 years ago

Redux form throws a warning when you don't give a form section a name. But if you do give it a name this line of code doesn't work because allValues consists of an object with a property name of the form section:

var fieldValue = typeof allValues.getIn === 'function' ? allValues.getIn(field.split('.')) : allValues[field];

I think there should be an option if it's a formsection: allValues[formSection][field]

Or am I doing something wrong?

gtournie commented 5 years ago

Fixed in 3.1.0.

you can now write field: 'formSectionName.fieldName'

tomcoppensucll commented 5 years ago

Awesome, thank you!