Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed propType: Required prop form was not specified in BootstrapForm. #12

Open
ndarilek opened this issue Oct 14, 2015 · 3 comments
Open

Comments

@ndarilek
Copy link

Seeing this error in my attempts to use newforms-bootstrap despite following the docs.

Out of curiosity, I headed to:

http://insin.github.io/newforms-bootstrap/allfields.html

to see if it also threw the warning and it does. The forms still seem to render, but I'm not sure if perhaps I'm doing something that will bite me later. There are also other warnings that may or may not need addressing.

Thanks.

@imamark
Copy link

imamark commented Oct 29, 2015

+1

1 similar comment
@rkovacevic
Copy link

+1

@ivensrocha
Copy link

+1

I see the line index.js:187
form: React.PropTypes.instanceOf(Form).isRequired,

As far as I see it is only to guarantee it is used between a <forms.Form></forms.Form> tag. But if you don't pass it, an error is generated anyways.

ivensrocha pushed a commit to ivensrocha/newforms-bootstrap that referenced this issue Jan 7, 2016
…llow 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.
ivensrocha pushed a commit to ivensrocha/newforms-bootstrap that referenced this issue Jan 7, 2016
…llow 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 the "required" form property on propTypes and made a validation inside render.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants