You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return{severity: "error",message: "{{name}} must be a valid URL."};
50
-
}
44
+
leturl: URL;
45
+
try{
46
+
url=newURL(value.trim());
47
+
}catch(_){
48
+
return{severity: "error",message: "{{name}} must be a valid URL."};
49
+
}
51
50
52
-
if(!protocols.has(format(url.protocol))){
53
-
return{severity: "error",message: `{{name}} must be an URL with one of the following protocols: ${[...protocols].join(", ")}.`};
54
-
}
51
+
if(!protocols.has(format(url.protocol))){
52
+
return{severity: "error",message: `{{name}} must be an URL with one of the following protocols: ${[...protocols].join(", ")}.`};
53
+
}
55
54
56
-
if(!isArgsValid){
57
-
return{
58
-
severity: "warning",
59
-
message:
60
-
"The arguments must be undefined, a string containing the allowed protocols separated by commas, semicolons or pipes, or an array of allowed protocols.",
61
-
};
55
+
if(!isArgsValid){
56
+
return{
57
+
severity: "warning",
58
+
message:
59
+
"The arguments must be undefined, a string containing the allowed protocols separated by commas, semicolons or pipes, or an array of allowed protocols.",
0 commit comments