Created
September 6, 2012 15:49
-
-
Save niuage/3657650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will match anything that URI.parse will recognize, meaning that it’s a pretty accurate and powerful URL matcher. | |
class User | |
validates_format_of :website, :with => URI::regexp(%w(http https)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment