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

Improve clarity, grammar in error message #1669

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

karlhorky
Copy link
Contributor

Hi @jquense, a quick PR to improve the grammar and clarity of this error message.

src/schema.ts Outdated
@@ -719,7 +719,7 @@ export default abstract class Schema<
if (opts.message === undefined) opts.message = locale.default;

if (typeof opts.test !== 'function')
throw new TypeError('`test` is a required parameters');
throw new TypeError('The `test` function parameter is a required parameter');

Choose a reason for hiding this comment

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

Why not to mention parameter word once?

The test function parameter is a required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test function parameter is a required.

this is not correct grammar

But in 2a8a539 I changed it to this:

The `test` function parameter is required

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