title: How to validate url in rails model?
body: <p>I have Url model have url column and I want to validate that column to be a valid url, I have try with this:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
      validates_format_of :url, :with =&gt; URI::regexp(%w(http https))
  end
  </code></pre>
  
  <p>But when I enter this url: <code>http://ruby3arabi</code> it's accept it, any ideas?</p>