DigitalRiver / react-atlas

Composable React components with CSS Modules.
http://digitalriver.github.io/react-atlas/
MIT License
38 stars 25 forks source link

Form validate prop should not be passed down to html form element #980

Open stuller opened 5 years ago

stuller commented 5 years ago

The doc site has a js error caused by the validate prop getting passed down to the html form element: image

Fix should just be adding validate to the blacklist in this line like so: const othersFiltered = blacklist(others, "onSubmit", "validate");

That will prevent it from getting added to the form dom element, since it only gets othersFiltered. We are already using this to populate the noValidate attribute on the dom element, so removing this should not disrupt functionality.

You'll need to update snapshot test as well before putting in a PR.