Skip to content

grosser/validates_exclusion_of_html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please use text_filter instead class User < ActiveRecord::Base text_filter :name, :email, :with=>:strip_tags end

I do not use or maintain validates_exclusion_of_html any longer.

old README:

Simple filtering for html as validation. There are more complete and complex solutions out there, but this is simple/painless.

class User < ActiveRecord::Base
  validates_exclusion_of_html :name, :username
  validates_exclusion_of_html :firstname, :message=>'dont be evil...'
end

Only supports :message option for now (default message is 'must not include > or <')

###Install script/plugin install git://github.com/grosser/validates_exclusion_of_html.git OR sudo gem install grosser-validates_exclusion_of_html -s http://gems.github.com

Author

Michael Grosser
grosser.michael@gmail.com
Hereby placed under public domain, do what you want, just do not hold me accountable...

About

AR: No HTML as validation -- deprecated, please use text_filter instead

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages