Skip to content

Commit

Permalink
return null
Browse files Browse the repository at this point in the history
  • Loading branch information
jcalado authored and austinried committed May 14, 2023
1 parent 52b5195 commit 889be2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/app/pages/source_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class SourcePage extends HookConsumerWidget {
autofillHints: const [AutofillHints.url],
required: true,
validator: (value, label) {
if (Uri.tryParse(value!)?.isAbsolute == false ||
!value.contains('http')) {
if (!value!.contains(RegExp(r'https?:\/\/'))) {
return '$label must be a valid URL';
}
return null;
},
);
final username = LabeledTextField(
Expand Down

0 comments on commit 889be2f

Please sign in to comment.