Skip to content

Commit

Permalink
Updates example to use checkType.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryasmi authored Dec 14, 2016
1 parent e82a94f commit c738f46
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ npm install --save git+https://[email protected]/ryansmith94/rulr.git

## Example
```js
isString = data =>
data.constructor === String;

checkString = checkBool(isString, typeError('string'));

data = {
a: 'hello',
d: [{
Expand All @@ -25,7 +20,7 @@ data = {
};

validateMyModel = restrictToSchema({
a: required(checkString),
a: required(checkType(String)),
d: optional(restrictToCollection(index => validateMyModel))
});

Expand Down

0 comments on commit c738f46

Please sign in to comment.