mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 09:09:29 +01:00
return null
This commit is contained in:
parent
52b51954aa
commit
889be2ff2c
@ -45,10 +45,10 @@ class SourcePage extends HookConsumerWidget {
|
|||||||
autofillHints: const [AutofillHints.url],
|
autofillHints: const [AutofillHints.url],
|
||||||
required: true,
|
required: true,
|
||||||
validator: (value, label) {
|
validator: (value, label) {
|
||||||
if (Uri.tryParse(value!)?.isAbsolute == false ||
|
if (!value!.contains(RegExp(r'https?:\/\/'))) {
|
||||||
!value.contains('http')) {
|
|
||||||
return '$label must be a valid URL';
|
return '$label must be a valid URL';
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
final username = LabeledTextField(
|
final username = LabeledTextField(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user