mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-23 10:53:45 +02:00
Minor form validation fix
This commit is contained in:
@@ -53,11 +53,12 @@ class GitHub extends AppSource {
|
|||||||
additionalValidators: [
|
additionalValidators: [
|
||||||
(value) {
|
(value) {
|
||||||
try {
|
try {
|
||||||
if (Uri.parse(
|
if (value != null && Uri.parse(value).scheme.isNotEmpty) {
|
||||||
'https://${value}/api.github.com',
|
|
||||||
).scheme.isNotEmpty) {
|
|
||||||
throw true;
|
throw true;
|
||||||
}
|
}
|
||||||
|
if (value != null) {
|
||||||
|
Uri.parse('https://${value}/api.github.com');
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return tr('invalidInput');
|
return tr('invalidInput');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user