Email, Slug, Url simple format validators for Rails 3
Add this to your Gemfile
:
gem "validates"
model User < ActiveRecord::Base
validates :email, :email => true
validates :site, :url => true, :allow_blank => true
validates :inn, :inn => true
end
model Page < ActiveRecord::Base
validates :slug, :slug => true
end
0.0.2 - Fixed email validator. If email not presence, should be validate anyway.
0.0.3 - Add inn validator.