Skip to content

Commit

Permalink
docs: list currently implemented validations
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
vladfaust committed Sep 19, 2018
1 parent 0949233 commit d8527c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -63,6 +63,18 @@ pp user.invalid_attributes
# }
```

### Currently implemented inline validations

* `is: Object` - check if `attribute == object`
* `gte: Comparable` - check if `attribute >= comparable`
* `lte: Comparable` - check if `attribute <= comparable`
* `gt: Comparable` - check if `attribute > comparable`
* `lt: Comparable` - check if `attribute < comparable`
* `in: Enumerable` - check if `enumerable.includes?(attribute)`
* `size: Enumerable` - check if `enumerable.includes?(attribute.size)`
* `size: Int` - check if `attribute.size == int`
* `regex: Regex` - check if `regex.match(attribute)`

## Contributing

1. Fork it (<https://github.com/vladfaust/validations.cr/fork>)
Expand Down

0 comments on commit d8527c6

Please sign in to comment.