class User < ActiveRecord::Base validates_format_of :url, :with => URI::regexp(%w(http https)) end
Reference: Stackoverflow
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Δ