Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Clarify return value of mixed.test #1089

Merged
merged 1 commit into from
Oct 29, 2020
Merged

docs: Clarify return value of mixed.test #1089

merged 1 commit into from
Oct 29, 2020

Conversation

greyscaled
Copy link
Contributor

Context

While it may seem obvious to many, I've previously found myself searching the docs more than once for
whether or not I wanted to return true or false in mixed.test validators. This is a minor change to
the README that clarifies the return value.

Additional Details

Cleaned up some long lines and capitalized the beginning of each paragraph

Context:

While it may seem obvious to many, I've previously found myself searching the docs more than once for
whether or not I wanted to return `true` or `false` in `mixed.test` validators. This is a minor change to
the README that clarifies the return value.

Additional Details:

Cleaned up some long lines and capitalized the beginning of each paragraph
Copy link
Owner

@jquense jquense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@jquense jquense merged commit 040c40d into jquense:master Oct 29, 2020
@@ -720,7 +720,10 @@ await schema.isValid('jimmy'); // => true
await schema.isValid('john'); // => false
```

test functions are called with a special context, or `this` value, that exposes some useful metadata and functions. Older versions just expose the `this` context using `function ()`, not arrow-func, but now it's exposed too as a second argument of the test functions. It's allow you decide which approach you prefer.
Test functions are called with a special context, or `this` value, that exposes some useful metadata
and functions. Older versions just expose the `this` context using `function ()`, not arrow-func,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true for the current release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants