title: Validate URL in Redux Form
body: <p>I am using <a href="https://redux-form.com/7.1.2/" rel="nofollow noreferrer">redux-form</a> package for my React Redux form. I know how to do validation for other fields e.g email, name.</p>
  
  <p>However, I do not know how to validate a URL in redux-form. What is the format that I should check for in my URL field?</p>
  
  <pre><code>const renderField = ({ input, label, type, placeholder, message , meta: { touched, error, warning } }) =&gt; (
      &lt;Form.Field &gt;
        &lt;label className="new-font"&gt;{label}&lt;/label&gt;
        &lt;Input {...input} type={type} className="new-font" placeholder={placeholder} /&gt;
        {touched &amp;&amp; error &amp;&amp;
          &lt;div&gt;
            &lt;Label
              basic
              color='red'
              pointing
              className="new-font"
            &gt;
            {error}
            &lt;/Label&gt;
          &lt;/div&gt;
        }
  
        {(input.name === ('desc') || input.name === ('hyperlink')) ?
         &lt;Message compact&gt;
           {message}
         &lt;/Message&gt; : &lt;span&gt;&lt;/span&gt;
        }
      &lt;/Form.Field&gt;
    )
  
  function validate(values){
    const errors ={};
    if(!values.name){
      errors.name='Please let me know who I should thank!';
    }
    if(!values.email){
      errors.email='Please enter an email address';
    }
    if (values.email &amp;&amp; !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(values.email)
    ) {
      errors.email = 'Please enter a valid email address e.g test@gmail.com'
    }
    if(values.desc &amp;&amp; values.desc.length &gt; 50 ){
      errors.desc="Key in 50 characters or less";
    }
    if(!values.hyperlink){
      errors.hyperlink="Insert a URL address here to your favourite website!";
    }
    return errors;
  }
  </code></pre>