Skip to content

Instantly share code, notes, and snippets.

@cmar
Created October 26, 2011 13:44
Show Gist options
  • Save cmar/1316392 to your computer and use it in GitHub Desktop.
Save cmar/1316392 to your computer and use it in GitHub Desktop.
URL Validation
validates :url, :presence => true,
:format => { :with => URI::regexp(%w(http https)) },
:uniqueness => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment