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

"Prop Type Validation Warning: Invalid error Prop in TextField2 Component" #47

Open
ravioli158 opened this issue Aug 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ravioli158
Copy link
Contributor

I'm experiencing a prop type validation warning in my React project related to the TextField2 component. The warning states that the error prop is expected to be a boolean, but a string is being supplied. Below are the details of the warning and the context in which it occurs.
teps to Reproduce:

Use the TextField2 component in a form or any UI element.
Pass a string to the error prop, such as "true" or "false" (which is likely the issue here).
Observe the prop type validation warning in the console.

Expected Behavior:

The TextField2 component should correctly validate the error prop as a boolean. If a string is passed, it should either be converted to a boolean or an error should be thrown to guide the developer.
Actual Behavior:

The component is receiving a string instead of a boolean, resulting in the following warning:

go

Warning: Failed prop type: Invalid prop error of type string supplied to ForwardRef(TextField2), expected boolean.

Context:

Environment: [e.g., Local development environment]
React Version: [e.g., 17.0.2]
Component: TextField2
@ravioli158 ravioli158 added the bug Something isn't working label Aug 10, 2024
@ravioli158 ravioli158 added the good first issue Good for newcomers label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants