question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Field validate prop is passed through to underlying component (React warning)

See original GitHub issue

For example:

    <Field
      component={TextField}
      name="email"
      floatingLabelText="Email address"
      disabled={submitting}
      validate={[required]}
    />

Results in:

Warning: Unknown prop `validate` on <input> tag. Remove this prop from the element.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alathoncommented, Dec 19, 2016

Just adding a ‘Me too’ here – getting a warning about passing validate down to input, with code like the OPs.

0reactions
lock[bot]commented, Dec 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to validate React props using PropTypes - LogRocket Blog
Learn how to validate props with React PropTypes, React's internal mechanism for adding type checking to component props.
Read more >
[React 15.2.0] Additional props warning · Issue #1249 - GitHub
The unknown-prop warning will fire if you attempt to render a DOM element with a prop that is not recognized by React as...
Read more >
How do I add validation to the form in my React component?
class Test extends React.Component { constructor(props) { super(props); this.state = { fields: {}, errors: {}, }; } handleValidation() { let fields ...
Read more >
How to Add React Form Validation - Telerik
This article teaches basic React form validation using controlled state inside of components. We use classes and plan to have a follow up ......
Read more >
Field - Redux Form
Allows you to to provide a field-level validation rule. The function is given the fields current value, all other form values, the props...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found