Skip to content

Commit 4b23e5b

Browse files
Merge branch 'main' into main
2 parents e712586 + 30d696d commit 4b23e5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2185
-391
lines changed

CHANGELOG.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
* Add max file size
1313
* Add notMatch
1414
* Add range
15+
* Add dateTime
1516
* Add date range
16-
* Add must be true
17-
* Add must be false
17+
* Add time
18+
* Add is true
19+
* Add is false
1820
* Add special characters
1921
* Add numeric characters
2022
* Add lowercase characters
@@ -33,13 +35,17 @@
3335
* Add endWith
3436
* Add contains
3537
* Add between
36-
* Add inList
38+
* Add containsElement
3739
* Add transform
38-
* Add iban
40+
* Add IBAN
41+
* Add BIC
3942
* Add skipWhen
4043
* Add log
4144
* Add aggregate
42-
45+
* Add unique
46+
* Add ISBN
47+
* Add singleLine
48+
* Add defaultValue
4349

4450
## 10.0.1
4551
* Fix regression (include l10n files)

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ Available built-in helper validators:
5656
- `FormBuilderValidators.aggregate()` - runs the validators in parallel, collecting all errors.
5757
- `FormBuilderValidators.log()` - runs the validator and logs the value at a specific point in the validation chain.
5858
- `FormBuilderValidators.skipWhen()` - runs the validator and skips the validation when a certain condition is met.
59+
- `FormBuilderValidators.defaultValue()` - runs the validator using the default value when the provided value is null.
5960

6061
Available built-in type validators include:
6162

6263
- `FormBuilderValidators.equal()` - requires the field's value to be equal to the provided object.
6364
- `FormBuilderValidators.integer()` - requires the field's value to be an integer.
64-
- `FormBuilderValidators.date()` - requires the field's value to be a valid date string.
65+
- `FormBuilderValidators.dateString()` - requires the field's value to be a valid date string.
66+
- `FormBuilderValidators.dateTime()` - requires the field's value to be a valid date time.
6567
- `FormBuilderValidators.dateRange()` - requires the field's value to be a within a date range.
68+
- `FormBuilderValidators.time()` - requires the field's value to be a valid time string.
6669
- `FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
6770
- `FormBuilderValidators.notMatch()` - requires the field's value to not match the provided regex pattern.
6871
- `FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
@@ -76,18 +79,19 @@ Available built-in type validators include:
7679
- `FormBuilderValidators.required()` - requires the field to have a non-empty value.
7780
- `FormBuilderValidators.uppercase()` - requires the field's value to be uppercase.
7881
- `FormBuilderValidators.lowercase()` - requires the field's value to be lowercase.
79-
- `FormBuilderValidators.mustBeTrue()` - requires the field's to be true.
80-
- `FormBuilderValidators.mustBeFalse()` - requires the field's to be false.
82+
- `FormBuilderValidators.isTrue()` - requires the field's to be true.
83+
- `FormBuilderValidators.isFalse()` - requires the field's to be false.
8184
- `FormBuilderValidators.hasSpecialChars()` - requires the field's to contain a specified number of special characters.
8285
- `FormBuilderValidators.hasUppercaseChars()` - requires the field's to contain a specified number of uppercase characters.
8386
- `FormBuilderValidators.hasLowercaseChars()` - requires the field's to contain a specified number of lowercase characters.
8487
- `FormBuilderValidators.hasNumericChars()` - requires the field's to contain a specified number of numeric characters.
85-
- `FormBuilderValidators.conditional()` - requires the field's to validate with another validator conditionally.
8688
- `FormBuilderValidators.alphabetical()` - requires the field's to contain only alphabetical characters.
8789
- `FormBuilderValidators.oddNumber()` - requires the field's to be an odd number.
8890
- `FormBuilderValidators.evenNumber()` - requires the field's to be an even number.
8991
- `FormBuilderValidators.between()` - requires the field's to be between two numbers.
90-
- `FormBuilderValidators.inList()` - requires the field's to be in the provided list.
92+
- `FormBuilderValidators.containsElement()` - requires the field's to be in the provided list.
93+
- `FormBuilderValidators.unique()` - requires the field's to be unique in the provided list.
94+
- `FormBuilderValidators.singleLine()` - requires the field's string to be a single line of text.
9195

9296
Available built-in use-case validators include:
9397

@@ -110,6 +114,20 @@ Available built-in use-case validators include:
110114
- `FormBuilderValidators.portNumber()` - requires the field's to be an valid port number.
111115
- `FormBuilderValidators.macAddress()` - requires the field's to be an valid MAC address.
112116
- `FormBuilderValidators.iban()` - requires the field's to be an valid IBAN.
117+
- `FormBuilderValidators.bic()` - requires the field's to be an valid BIC.
118+
- `FormBuilderValidators.isbn()` - requires the field's to be an valid ISBN.
119+
120+
Available extension methods used for chaining validators:
121+
122+
- `FormBuilderValidator.and()` - Combines the current validator with another validator using logical AND.
123+
- `FormBuilderValidator.or()` - Combines the current validator with another validator using logical OR.
124+
- `FormBuilderValidator.not()` - Negates the current validator.
125+
- `FormBuilderValidator.when()` - Adds a condition to apply the validator only if the condition is met.
126+
- `FormBuilderValidator.unless()` - Adds a condition to apply the validator only if the condition is not met.
127+
- `FormBuilderValidator.transform()` - Transforms the value before applying the validator.
128+
- `FormBuilderValidator.skipWhen()` - Skips the validator if the condition is met.
129+
- `FormBuilderValidator.log()` - Logs the value during the validation process.
130+
- `FormBuilderValidator.withMessage()` - Overrides the error message of the current validator.
113131

114132
### Supported languages
115133

lib/l10n/intl_al.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "Vlera duhet të përfundojë me {value}.",
5050
"containsErrorText": "Vlera duhet të përmbajë {value}.",
5151
"betweenErrorText": "Vlera duhet të jetë ndërmjet {min} dhe {max}.",
52-
"valueInListErrorText": "Vlera duhet të jetë në listën e vlefshme.",
53-
"ibanErrorText": "Kjo fushë kërkon një IBAN të vlefshëm."
52+
"containsElementErrorText": "Vlera duhet të jetë në listën e vlefshme.",
53+
"ibanErrorText": "Kjo fushë kërkon një IBAN të vlefshëm.",
54+
"uniqueErrorText": "Kjo vlerë duhet të jetë unike.",
55+
"bicErrorText": "Kjo fushë kërkon një kod BIC të vlefshëm.",
56+
"isbnErrorText": "Kjo fushë kërkon një ISBN të vlefshëm.",
57+
"singleLineErrorText": "Kjo fushë kërkon një tekst me një rresht.",
58+
"timeErrorText": "Kjo fushë kërkon një kohë të vlefshme."
5459
}

lib/l10n/intl_ar.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "القيمة يجب أن تنتهي بـ {value}.",
5050
"containsErrorText": "القيمة يجب أن تحتوي على {value}.",
5151
"betweenErrorText": "القيمة يجب أن تكون بين {min} و {max}.",
52-
"valueInListErrorText": "القيمة يجب أن تكون ضمن القائمة المسموح بها.",
53-
"ibanErrorText": "هذا الحقل يتطلب IBAN صالح."
52+
"containsElementErrorText": "القيمة يجب أن تكون ضمن القائمة المسموح بها.",
53+
"ibanErrorText": "هذا الحقل يتطلب IBAN صالح.",
54+
"uniqueErrorText": "هذا الحقل يجب أن يحتوي على قيمة فريدة.",
55+
"bicErrorText": "هذا الحقل يتطلب رمز BIC صالح.",
56+
"isbnErrorText": "هذا الحقل يتطلب رقم ISBN صالح.",
57+
"singleLineErrorText": "هذا الحقل يجب أن يحتوي على سطر واحد فقط.",
58+
"timeErrorText": "هذا الحقل يتطلب وقت صالح."
5459
}

lib/l10n/intl_bg.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "Стойността трябва да завършва с {value}.",
5050
"containsErrorText": "Стойността трябва да съдържа {value}.",
5151
"betweenErrorText": "Стойността трябва да е между {min} и {max}.",
52-
"valueInListErrorText": "Стойността трябва да е в списъка с допустими стойности.",
53-
"ibanErrorText": "Това поле изисква валиден IBAN."
52+
"containsElementErrorText": "Стойността трябва да е в списъка с допустими стойности.",
53+
"ibanErrorText": "Това поле изисква валиден IBAN.",
54+
"uniqueErrorText": "Това поле изисква уникална стойност.",
55+
"bicErrorText": "Това поле изисква валиден BIC код.",
56+
"isbnErrorText": "Това поле изисква валиден ISBN номер.",
57+
"singleLineErrorText": "Това поле трябва да съдържа само един ред.",
58+
"timeErrorText": "Това поле изисква валидно време."
5459
}

lib/l10n/intl_bn.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "মানটি {value} দিয়ে শেষ হতে হবে।",
5050
"containsErrorText": "মানটি {value} ধারণ করতে হবে।",
5151
"betweenErrorText": "মানটি {min} এবং {max} এর মধ্যে হতে হবে।",
52-
"valueInListErrorText": "মানটি অনুমোদিত তালিকার মধ্যে থাকতে হবে।",
53-
"ibanErrorText": "একটি বৈধ IBAN প্রয়োজন।"
52+
"containsElementErrorText": "মানটি অনুমোদিত তালিকার মধ্যে থাকতে হবে।",
53+
"ibanErrorText": "একটি বৈধ IBAN প্রয়োজন।",
54+
"uniqueErrorText": "মানটি অবশ্যই অনন্য মানগুলির মধ্যে অদ্বিতীয় হতে হবে।",
55+
"bicErrorText": "একটি বৈধ BIC প্রয়োজন।",
56+
"isbnErrorText": "একটি বৈধ ISBN প্রয়োজন।",
57+
"singleLineErrorText": "এই ফিল্ডে একটি একক লাইন থাকতে হবে।",
58+
"timeErrorText": "একটি বৈধ সময় প্রয়োজন।"
5459
}

lib/l10n/intl_bs.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "Vrijednost mora završiti sa {value}.",
5050
"containsErrorText": "Vrijednost mora sadržavati {value}.",
5151
"betweenErrorText": "Vrijednost mora biti između {min} i {max}.",
52-
"valueInListErrorText": "Vrijednost mora biti na listi dopuštenih vrijednosti.",
53-
"ibanErrorText": "Unesite validan IBAN."
52+
"containsElementErrorText": "Vrijednost mora biti na listi dopuštenih vrijednosti.",
53+
"ibanErrorText": "Unesite validan IBAN.",
54+
"uniqueErrorText": "Vrijednost mora biti jedinstvena.",
55+
"bicErrorText": "Unesite validan BIC.",
56+
"isbnErrorText": "Unesite validan ISBN.",
57+
"singleLineErrorText": "Vrijednost mora biti jedan redak teksta.",
58+
"timeErrorText": "Unesite validno vrijeme."
5459
}

lib/l10n/intl_ca.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "El valor ha d'acabar amb {value}.",
5050
"containsErrorText": "El valor ha de contenir {value}.",
5151
"betweenErrorText": "El valor ha d'estar entre {min} i {max}.",
52-
"valueInListErrorText": "El valor ha d'estar en la llista de valors permesos.",
53-
"ibanErrorText": "Aquest camp requereix un IBAN vàlid."
52+
"containsElementErrorText": "El valor ha d'estar en la llista de valors permesos.",
53+
"ibanErrorText": "Aquest camp requereix un IBAN vàlid.",
54+
"uniqueErrorText": "Aquest camp requereix un valor únic.",
55+
"bicErrorText": "Aquest camp requereix un codi BIC vàlid.",
56+
"isbnErrorText": "Aquest camp requereix un ISBN vàlid.",
57+
"singleLineErrorText": "Aquest camp ha de ser una línia única.",
58+
"timeErrorText": "Aquest camp requereix una hora vàlida."
5459
}

lib/l10n/intl_cs.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "Hodnota musí končit na {value}.",
5050
"containsErrorText": "Hodnota musí obsahovat {value}.",
5151
"betweenErrorText": "Hodnota musí být mezi {min} a {max}.",
52-
"valueInListErrorText": "Hodnota musí být v seznamu povolených hodnot.",
53-
"ibanErrorText": "Pole vyžaduje platné IBAN."
52+
"containsElementErrorText": "Hodnota musí být v seznamu povolených hodnot.",
53+
"ibanErrorText": "Pole vyžaduje platné IBAN.",
54+
"uniqueErrorText": "Hodnota musí být jedinečná.",
55+
"bicErrorText": "Pole vyžaduje platný BIC kód.",
56+
"isbnErrorText": "Pole vyžaduje platné ISBN.",
57+
"singleLineErrorText": "Pole musí obsahovat pouze jednu řádku.",
58+
"timeErrorText": "Pole vyžaduje platný čas."
5459
}

lib/l10n/intl_da.arb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"endsWithErrorText": "Værdien skal slutte med {value}.",
5050
"containsErrorText": "Værdien skal indeholde {value}.",
5151
"betweenErrorText": "Værdien skal være mellem {min} og {max}.",
52-
"valueInListErrorText": "Værdien skal være på listen over tilladte værdier.",
53-
"ibanErrorText": "Dette felt kræver en gyldig IBAN."
52+
"containsElementErrorText": "Værdien skal være på listen over tilladte værdier.",
53+
"ibanErrorText": "Dette felt kræver en gyldig IBAN.",
54+
"uniqueErrorText": "Dette felt skal være unikt.",
55+
"bicErrorText": "Dette felt kræver en gyldig BIC.",
56+
"isbnErrorText": "Dette felt kræver et gyldigt ISBN-nummer.",
57+
"singleLineErrorText": "Dette felt skal være en enkelt linje.",
58+
"timeErrorText": "Dette felt kræver en gyldig tid."
5459
}

0 commit comments

Comments
 (0)