Skip to content

webhoernchen/validates_as_uri

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ValidatesAsUri

URI validation for ActiveModel

Installation

You can install as gem:

gem "validates_as_uri"

Or as plugin:

$ rails plugin install git://github.com/sobrinho/validates_as_uri.git

Usage

class Repository < ActiveRecord::Base
  validates :url, :uri => { :protocols => %w(git svn) }
  validates :homepage, :uri => true # default protocols are %w(http https)
end

License

Copyright © 2009-2010 Gabriel Sobrinho, released under the MIT license

About

URI validation for ActiveModel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%