title: url_field to accept non http:// or https:// links
body: <p>I have tried useing <code>url_field</code> tag in my form. </p>
  
  <p>I should be able to enter non <code>http://</code> urls, e.g I would need to enter <code>www.google.com</code>. But rails url_field does not allow this.</p>
  
  <p>Is there any way to do it?</p>
  
  <p>This is my current setup:</p>
  
  <pre><code>&lt;%= f.url_field :english_link,  :class =&gt; "form-control", :placeholder =&gt;"Type your message", :rows =&gt; "4", maxlength: 130, spellcheck: true %&gt;
  </code></pre>
  
  <p>I also tried using a regex within <code>f.text_field</code> , but it is not working.</p>
  
  <pre><code>&lt;%= f.text_field :english_link, pattern: /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/, :class =&gt; "form-control", :placeholder =&gt; "Enter URL Link Here" %&gt;
  </code></pre>
  
  <p>I checked to see if the regex works in rubular.com, and it is working. </p>