From 0b18c6781074b3c760663a8297a9a8c54809584f Mon Sep 17 00:00:00 2001 From: Patrick Schmidt Date: Sat, 30 Sep 2023 12:35:57 +0200 Subject: [PATCH] Fixed simple input validtor --- lib/util/validator/custom_form_builder_validators.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/validator/custom_form_builder_validators.dart b/lib/util/validator/custom_form_builder_validators.dart index 1b91a1b0..fdae6525 100644 --- a/lib/util/validator/custom_form_builder_validators.dart +++ b/lib/util/validator/custom_form_builder_validators.dart @@ -14,7 +14,7 @@ final class MobilerakerFormBuilderValidator { if (valueCandidate != null) { assert(valueCandidate is String); - if (!RegExp(r'^[\w.-]+:(?!0)[1-9][0-9]*$').hasMatch(valueCandidate as String)) { + if (!RegExp(r'^[\w.-]+(?::(?!0)[1-9][0-9]*)?$').hasMatch(valueCandidate as String)) { return errorText ?? tr('form_validators.simple_url'); } }