make eager parsing required
This commit is contained in:
@@ -53,7 +53,11 @@ class AddFeedDialog extends HookConsumerWidget {
|
||||
controller: textController,
|
||||
keyboardType: TextInputType.url,
|
||||
validator: (value) {
|
||||
return validateUrl(value, onlyHttpProtocol: true);
|
||||
return validateUrl(
|
||||
value,
|
||||
onlyHttpProtocol: true,
|
||||
eagerParsing: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -233,6 +233,7 @@ class _FeedEditContent extends HookConsumerWidget {
|
||||
value,
|
||||
onlyHttpProtocol: true,
|
||||
required: false,
|
||||
eagerParsing: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -249,6 +250,7 @@ class _FeedEditContent extends HookConsumerWidget {
|
||||
value,
|
||||
onlyHttpProtocol: true,
|
||||
required: false,
|
||||
eagerParsing: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -269,7 +271,11 @@ class _FeedEditContent extends HookConsumerWidget {
|
||||
controller: urlTextController,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
validator: (value) {
|
||||
return validateUrl(value, onlyHttpProtocol: true);
|
||||
return validateUrl(
|
||||
value,
|
||||
onlyHttpProtocol: true,
|
||||
eagerParsing: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -22,8 +22,8 @@ import 'package:weblibre/utils/uri_parser.dart' as uri_parser;
|
||||
|
||||
String? validateUrl(
|
||||
String? value, {
|
||||
required bool eagerParsing,
|
||||
bool requireAuthority = true,
|
||||
bool eagerParsing = true,
|
||||
bool onlyHttpProtocol = false,
|
||||
bool required = true,
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user