Validate the format of a URL by regexp in Ruby on Rails.