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

Quick input validation doesn't run for preset value #52908

Closed
joaomoreno opened this issue Jun 26, 2018 · 1 comment
Closed

Quick input validation doesn't run for preset value #52908

joaomoreno opened this issue Jun 26, 2018 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

Testing #52818

Have the following snippet:

await vscode.window.showInputBox({
   validateInput: value => /a/.test(value) ? 'uh oh' : null,
   value: 'hello warld'
}, tokenSource.token);

The validation doesn't run for that predefined value.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues labels Jun 26, 2018
@chrmarti chrmarti added this to the June 2018 milestone Jun 26, 2018
@chrmarti
Copy link
Contributor

Changing it to run validation on the initial value. If there is a validation message on the initial value, it will not be shown until the user tries to accept it or changes the value and then return to the initial one. This avoids having the input box open with an error shown immediately which would be odd.

@joaomoreno joaomoreno added the verified Verification succeeded label Jun 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants