Sha256: a4e28ef05eb47fd317e4003d683584791924b0038a5f709f3f4419db45443389

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

# Hval 🐳

Hval is a Hash Validation gem.

## Installation

Not available in rubygems (yet) so you can clone the repo and build the gem from source.

```
$ gem build hval.gemspec
$ gem install hval-0.1.0.gem
```

## Usage

```ruby
schema = {name: {type?: String, format?: /brush/}, age: {type?: Integer }
validator = Hval::Validator.new(schema)
validator.call({name: "guybrush", age: 45})
validator.valid?
=> true
```


## Development

Hval is swimming under water, and will suffer a lot of changes. The gem approach is very naive and not fully tested, so if you 
use it be carefull. Critics, fixes, suggestions are more than welcome. 

## Todo

* Return errors with messages and in a friendly format. Now, the return of the #call method return information about the result of the validation.
 
## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Hval project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jmrepetti/hval/blob/master/CODE_OF_CONDUCT.md).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hval-0.1.1 README.md