Sha256: 30d6d12425695e54668a1695298c51917fbab3bccf4ed8ce074cbce16d111ca9

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

require 'active_model'

class User
  include ActiveModel::Validations

  validates_acceptance_of :eula
  validates_acceptance_of :terms_of_service, accept: true

  validates_confirmation_of :password

  validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/

  validates_length_of :name, minimum: 10, maximum: 100
  validates_length_of :password, is: 8
  validates_size_of :lastname, maximum: 100

  validates_presence_of :name
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minitest-activemodel-1.1.0 test/models/user.rb
minitest-activemodel-1.0.0 test/models/user.rb