diff --git a/README.md b/README.md index fba664e..1143583 100644 --- a/README.md +++ b/README.md @@ -175,8 +175,10 @@ compose( required: true }, age: { - test: (value) => { - return age && age > 18 + test: (value, fail) => { + if (!value || value <= 18) { + return fail('Age must be 18 or older'); + } } } })