Sha256: f68d20071f2b0b00e6ce27aab04105326bdd5184fb42de8a828df11832fcbdec
Contents?: true
Size: 293 Bytes
Versions: 77
Compression:
Stored size: 293 Bytes
Contents
class Contact < ApplicationRecord validates :name, presence: true validates :age, presence: true, numericality: true, inclusion: { in: 20...100, message: "must be between 20 and 100" } validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i } end
Version data entries
77 entries across 77 versions & 1 rubygems