Skip to content

krzyzak/micro_validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

µValidator

Zero dependency, dead simple validation library.

Usage

require "micro_validator"


class Foo
  validate :bar
  validate :baz
  
  private
  def bar
   errors.add(:attribute, "Attribute is wrong") if attribute == "Wrong"
  end
  
  def baz
    false # Always fails
  end
end

@foo = Foo.new
@foo.valid? # => false

About

No description, website, or topics provided.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages