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

Impossible to disable language.key in options #1334

Closed
bezenson opened this issue Oct 19, 2017 · 0 comments
Closed

Impossible to disable language.key in options #1334

bezenson opened this issue Oct 19, 2017 · 0 comments
Labels
bug Bug or defect
Milestone

Comments

@bezenson
Copy link

Context

  • node version: 6.11.4
  • joi version: 13.0.0
  • environment: browser
  • used with: react, redux-form

What are you trying to achieve or the steps to reproduce ?

Hi. I found that via options impossible to disable language.key. I've tried to put false and empty string. As a workaround string with one space works. But seems like it is not ok and looks weird.

const schema = Joi.object().keys({
  domain: Joi.string()
    .alphanum()
    .required()
    .options({
      language: {
        // key: false, - not working
        // key: '', - not working
        key: ' ', // works
        string: { alphanum: 'check the spelling of your {{label}} domain and try again' },
      },
    }),
});

What did you expect ?

Ability to disable language.key with false or something like that.

@Marsup Marsup self-assigned this Oct 19, 2017
@Marsup Marsup added the bug Bug or defect label Oct 19, 2017
@Marsup Marsup added this to the 13.0.1 milestone Oct 19, 2017
@Marsup Marsup closed this as completed in bd97db7 Oct 19, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

2 participants