This commit is contained in:
@@ -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