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

Remove quotation marks from error messages #2182

Closed
alberto264 opened this issue Oct 15, 2019 · 1 comment
Closed

Remove quotation marks from error messages #2182

alberto264 opened this issue Oct 15, 2019 · 1 comment
Assignees
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Milestone

Comments

@alberto264
Copy link

Support plan

  • which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: 12.4.0
  • module version: 16.1.7
  • environment (e.g. node, browser, native): browser
  • used with (e.g. hapi application, another framework, standalone, ...): standalone
  • any other relevant information:

How can we help?

Is there a way to remove the quotes for the label?, I've already read the docs, did some tests with errors.label but no luck, I still want the label but not the quotes, with v15 joi I was able to do it by redefining the base key, but it seems that concept disappeared in this version

@alberto264 alberto264 added the support Questions, discussions, and general support label Oct 15, 2019
@hueniverse
Copy link
Contributor

There is no way to remove the quotes. It might be added as a new option in the future but for now, your only two options are to override error messages or modify the error message after validation fails by changing the strings.

@hueniverse hueniverse self-assigned this Oct 15, 2019
@hueniverse hueniverse added breaking changes Change that can breaking existing code feature New functionality or improvement and removed support Questions, discussions, and general support labels Nov 17, 2019
@hueniverse hueniverse added this to the 17.0.0 milestone Nov 17, 2019
hueniverse added a commit that referenced this issue Nov 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

2 participants