Module: Validation::Validatable

Defined in:
lib/validation/validatable.rb,
lib/validation/validatable/classmethods.rb

Overview

A way of defining accessor with flexible validations.

Examples:

define accessor with validations

class Person
  include Validation
  attr_validator :name, AND(String, /\A\w+(?: \w+)*\z/), &:strip
  attr_validator :birthday, Time
end

Defined Under Namespace

Modules: ClassMethods