From d8527c6877fa7eafefc6196935ce03cc5f3c2191 Mon Sep 17 00:00:00 2001 From: Vlad Faust Date: Thu, 20 Sep 2018 00:06:31 +0300 Subject: [PATCH] docs: list currently implemented validations Closes #2 --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 8f6e865..b4e68ac 100644 --- a/README.md +++ b/README.md @@ -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 ()