newforms-bootstrap
newforms-bootstrap copied to clipboard
Fixed an error was being raised as pointed at #12 even if one follow …
Fixed an error was being raised as pointed at #12 even if one follow the docs the docs:
Warning: Failed propType: Required prop `form` was not specified in `BootstrapForm`. Check the render method of `App`.
As far as I see the required of form is only used in order to guarantee it is used between a newforms.Form tag. But if you don`t pass it, an error is raised anyway:
Uncaught TypeError: Cannot read property `__patchedByBootstrapForm` of undefined
So I removed the mandatory form and made a validation inside render.
Feel free to refuse this fix since I`m not sure whether making form required has an important need that I was unaware of.