This commit is contained in:
54 files changed
+5492
-2406
No files matched your search
@@ -1,11 +1,10 @@
|
||||
export function isValidPaymentLink(value: string): boolean {
|
||||
if (!value.trim()) return false
|
||||
if (!value.trim()) return false;
|
||||
|
||||
try {
|
||||
const url = new URL(value)
|
||||
return url.protocol === 'https:' || url.protocol === 'http:'
|
||||
}
|
||||
catch {
|
||||
return false
|
||||
const url = new URL(value);
|
||||
return url.protocol === 'https:' || url.protocol === 'http:';
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user