Guest User

Untitled

a guest
Jul 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. validates :terms, :acceptance => true
  2. validates :password, :confirmation => true
  3. validates :username, :exclusion => { :in => %w(admin superuser) }
  4. validates :email, :format => { :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create }
  5. validates :age, :inclusion => { :in => 0..9 }
  6. validates :first_name, :length => { :maximum => 30 }
  7. validates :age, :numericality => true
  8. validates :username, :presence => true
  9. validates :username, :uniqueness => true
Add Comment
Please, Sign In to add comment