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

any.external: can't disable label #2635

Closed
m-kemarskyi opened this issue Jul 13, 2021 · 3 comments · Fixed by #2651
Closed

any.external: can't disable label #2635

m-kemarskyi opened this issue Jul 13, 2021 · 3 comments · Fixed by #2651
Assignees
Labels
bug Bug or defect
Milestone

Comments

@m-kemarskyi
Copy link

Support plan

  • is this issue currently blocking your project? (yes/no):yes
  • is this issue affecting a production system? (yes/no):yes

Context

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

How can we help?

I've decided to use any.external method to implement custom async validation. Async validation works perfectly, but error message is modified with a label:
Снимок экрана 2021-07-13 в 14 48 25
Then I've found "errors.label" parameter for a validateAsync method. Setting label to false removed the label, but not the parentheses:
Снимок экрана 2021-07-13 в 14 50 14
Снимок экрана 2021-07-13 в 14 50 51
As you can see on a screenshot, I've also tried to set render to false, but it doesn't work. Could you help me with it? How can I disable it? As a result I want to receive my error message without any modifications. Thanks in advance!

@Marsup
Copy link
Collaborator

Marsup commented Jul 23, 2021

I'm not sure where this message is coming from, this is not part of joi, you'll have to provide a reproduction for someone to help.

@m-kemarskyi
Copy link
Author

@Marsup it's definitely a part of Joi, I've already explored source code, tests. I'll provide you with files and lines of code, where this behavior is implemented a little bit later.

@imjared
Copy link

imjared commented Aug 5, 2021

This seems to be the same (or similar to the) issue reported in #2600

Marsup added a commit that referenced this issue Aug 5, 2021
@hueniverse hueniverse added the bug Bug or defect label Dec 1, 2021
@hueniverse hueniverse added this to the 17.5.0 milestone Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants