Skip to content

Commit

Permalink
changed localization key and regx exec to test
Browse files Browse the repository at this point in the history
Signed-off-by: msivasubramaniaan <[email protected]>
  • Loading branch information
msivasubramaniaan committed Feb 23, 2023
1 parent dfc648f commit 2fea951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/languageservice/parser/jsonParser07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const formats = {
pattern: /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/,
},
ipv6: {
errorMessage: localize('ipv4FormatWarning', 'String does not match IPv6 format.'),
errorMessage: localize('ipv6FormatWarning', 'String does not match IPv6 format.'),
pattern: /^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i,
},
};
Expand Down Expand Up @@ -1066,7 +1066,7 @@ function validate(
case 'ipv6':
{
const format = formats[schema.format];
if (!node.value || !format.pattern.exec(node.value)) {
if (!node.value || !format.pattern.test(node.value)) {
validationResult.problems.push({
location: { offset: node.offset, length: node.length },
severity: DiagnosticSeverity.Warning,
Expand Down

0 comments on commit 2fea951

Please sign in to comment.