mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 01:25:36 -05:00
fix the input box validation (#15634)
* fix the input box validation * fix one more place
This commit is contained in:
@@ -116,7 +116,7 @@ export function validateInputs(optionsMap: { [optionName: string]: IOptionElemen
|
||||
optionElement.option.valueType === ServiceOptionType.number);
|
||||
|
||||
if (isInputBox) {
|
||||
if (!widget.validate()) {
|
||||
if (widget.validate() !== undefined) {
|
||||
isValid = false;
|
||||
if (!isFocused) {
|
||||
isFocused = true;
|
||||
|
||||
@@ -159,7 +159,7 @@ export default class InputBoxComponent extends ComponentBase<azdata.InputBoxProp
|
||||
public async validate(): Promise<boolean> {
|
||||
await super.validate();
|
||||
// Let the input validate handle showing/hiding the error message
|
||||
const valid = this.inputElement.validate();
|
||||
const valid = this.inputElement.validate() === undefined;
|
||||
|
||||
// set aria label based on validity of input
|
||||
if (valid) {
|
||||
|
||||
Reference in New Issue
Block a user