mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
feat(frontend): carry out minimal URL validation for url fields
This commit is contained in:
@@ -423,6 +423,19 @@ export default function Configure() {
|
||||
);
|
||||
return false;
|
||||
}
|
||||
console.log(option.label);
|
||||
if (option.id.toLowerCase().includes('url')) {
|
||||
try {
|
||||
new URL(addon.options[option.id]);
|
||||
} catch (_) {
|
||||
showToast(
|
||||
`Invalid URL for ${option.label}`,
|
||||
'error',
|
||||
'invalidUrl'
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user