@@ -2,12 +2,15 @@ import 'package:flutter_test/flutter_test.dart';
22import 'package:form_builder_validators/form_builder_validators.dart' ;
33
44void main () {
5+ String turkishLowercase = 'abcçdefgğhıijklmnoöprsştuüvyz' ;
6+ String randomAlphabeticalChars = 'bæàøĉijɣφϋϗϧѓѽծⴌḝἄⓜⰲⲫa' ;
57 const String customErrorMessage = 'custom error message' ;
68 group ('Validator: hasMinSpecialCharsValidator' , () {
79 group ('Validations with default error message' , () {
810 final List <({String input, bool isValid, int ? minValue})> testCases =
911 < ({int ? minValue, String input, bool isValid})> [
1012 (minValue: null , input: '' , isValid: false ),
13+ (minValue: null , input: ' ' , isValid: true ),
1114 (minValue: null , input: 'D' , isValid: false ),
1215 (minValue: null , input: 'password' , isValid: false ),
1316 (minValue: 1 , input: '*' , isValid: true ),
@@ -18,8 +21,13 @@ void main() {
1821 (minValue: 2 , input: '==' , isValid: true ),
1922 (minValue: 2 , input: '@_-' , isValid: true ),
2023 (minValue: 2 , input: 'password13%%' , isValid: true ),
24+ (minValue: 2 , input: 'paççword13' , isValid: false ),
2125 (minValue: 2 , input: 'Password123#@#' , isValid: true ),
2226 (minValue: 4 , input: 'Pass0word123!!!!' , isValid: true ),
27+ // Testing for non A-Z chars
28+ (minValue: 1 , input: 'ç' , isValid: false ),
29+ (minValue: 1 , input: randomAlphabeticalChars, isValid: false ),
30+ (minValue: 1 , input: turkishLowercase, isValid: false ),
2331 ];
2432
2533 for (final (
0 commit comments