Skip to content

Commit

Permalink
Fixed simple input validtor
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Sep 30, 2023
1 parent 73dc829 commit 0b18c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/validator/custom_form_builder_validators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down

0 comments on commit 0b18c67

Please sign in to comment.