title: TypeError: Cannot read property 'isRequired' of undefined
body: <p>I am new in React.js. I am trying to validate the propTypes but it shows the error "TypeError: Cannot read property 'isRequired' of undefined". I will be Thankful for the suggestions.       </p>
  
  <pre><code>import React from "react";
  import classnames from "classnames";
  import PropTypes from "prop-types";
  
  const TextFieldGroup = ({
    name,
    palceholder,
    value,
    label,
    error,
    info,
    type,
    onChange,
    disabled
  }) =&gt; {
    return (
      &lt;div className="form-group"&gt;
        &lt;input
          type={type}
          className={classnames("form-control form-control-lg", {
            "is-invalid": { error }
  
        {error &amp;&amp; &lt;div className="invalid-feedback"&gt;{error}&lt;/div&gt;}
      &lt;/div&gt;
    );
  };
  
  TextFieldGroup.propTypes = {
    name: PropTypes.string.isRequired,
    palceholder: PropTypes.string,
    value: PropTypes.string.isRequired,
    label: PropTypes.string,
    error: PropTypes.string,
    info: PropTypes.string,
    type: PropTypes.string.isRequired,
    onChange: PropTypes.func.isRequired,
    disabled: PropTypes.string
  };
  
  TextFieldGroup.defaultProps = {
    type: "text"
  };
  
  export default TextFieldGroup;
  </code></pre>