Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- validates :terms, :acceptance => true
- validates :password, :confirmation => true
- validates :username, :exclusion => { :in => %w(admin superuser) }
- validates :email, :format => { :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create }
- validates :age, :inclusion => { :in => 0..9 }
- validates :first_name, :length => { :maximum => 30 }
- validates :age, :numericality => true
- validates :username, :presence => true
- validates :username, :uniqueness => true
Add Comment
Please, Sign In to add comment