Change:
Found this issue while trying to set 's format to uri (or uri-reference), in order to fix <!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.42.0-insider () OS Version: Mac OS 10.14.6 Steps to Reproduce: a "mysetting" setting define "format":"uri" (as documented in ) settings in UI, write then delete some value, no error is shown , see that has a warning: <img width="1155" alt="Screen Shot 2020-01-15 at 7 44 33 PM" src="https://user-"The validation error should be displayed in the UI too (as it does when using a validation pattern) <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Maybe
I guess we are missing that validation, also, the type of that setting should be if the default is "null".
I can try working on this. Any code pointers, though? Not sure where to look.
See for where these validations for the settings editor live. You need to figure out what validation the json language server does for . I assume that lives somewhere in but I don't know where. I can help you if you can't find it.
Verifier: the extension and search in the settings editor different values in the textbox that shows up. The empty string should not be accepted, and a string such as should not be accepted. However, , , and should be accepted.
This bug has been fixed in to the latest release of ! you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text to let us know. If not, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!

Discussion:
} function getStringValidators(prop: IConfigurationPropertySchema) { <ins> const uriRegex = /^(([^:/?#]+?):)?(//([^/?#]*))?([^?#]*)(?([^#]*))?(#(.*))?/; </ins> let patternRegex: RegExp | undefined; if (typeof prop.pattern === 'string') { patternRegex = new RegExp(prop.pattern); } return [ { enabled: prop.maxLength !== undefined,

enabled: prop.format === 'color-hex', isValid: ((value: string) => Color.Format.CSS.parseHex(value)), message: nls.localize('validations.colorFormat', "Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.") <del> } </del> <ins> }, { enabled: prop.format === 'uri' || prop.format === 'uri-reference', isValid: ((value: string) => !!value.length), message: nls.localize('validations.uriEmpty', "URI expected.") }, { enabled: prop.format === 'uri' || prop.format === 'uri-reference', isValid: ((value: string) => uriRegex.test(value)), message: nls.localize('validations.uriMissing', "URI is expected.") }, { enabled: prop.format === 'uri', isValid: ((value: string) => { const matches = value.match(uriRegex); return !!(matches && matches[2]); }), message: nls.localize('validations.uriSchemeMissing', "URI with a scheme is expected.") }, </ins> ].filter(validation => validation.enabled); }

testInvalidTypeError([null], 'null', false); testInvalidTypeError('null', 'null', false); }); <ins> test('uri checks work', () => { const tester = new Tester({ type: 'string', format: 'uri' }); tester.rejects('example.com'); tester.rejects('example.com/example'); tester.rejects('example/example.html'); tester.rejects('www.example.com'); tester.rejects(''); tester.rejects(' '); tester.rejects('example'); tester.accepts('https:'); tester.accepts('https://'); tester.accepts('https://example.com'); tester.accepts('https://www.example.com'); }); </ins> });