Skip to content

Commit e4c77a0

Browse files
add terminology update node
1 parent 2a0dd35 commit e4c77a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/migration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ FormBuilderValidators.someValidator(..., checkNullOrEmpty:false);
2323
Validators.optional(Validators.someEquivalentValidator(...));
2424
```
2525

26+
#### Terminology Update
27+
In versions prior to 11.x.x, validators used outdated "whitelist/blacklist" terminology. Starting from version 12.x.x, we've updated to:
28+
- **Whitelist****Allow list** (the only permitted values)
29+
- **Blacklist****Block list** (forbidden values)
30+
31+
##### Best Practices for Allow/Block Logic
32+
For validators that support Allow/Block lists, follow these logical patterns:
33+
- **Allow list only**: Specify the only permitted values
34+
- **Block list + regex**: Use regex for format validation combined with forbidden values
35+
36+
> **Note about examples**: For the validators that use allow/block lists, the migration examples below show all three patterns (regex, allow list, and block list) together purely for demonstration purposes. In practice, using both allow and block lists simultaneously is typically unnecessary and may create conflicting logic.
37+
38+
2639
#### Bool validators
2740

2841
For the following group of validators (`hasLowercaseChars`, `hasNumericChars`, `hasSpecialChars`, and `hasUppercaseChars`), they are expected to receive a `String` as user input. Thus, if your form widget does not guarantee a `String` input (e.g. it may receive an `Object`), you must wrap the equivalent validator with the type validator for strings (`Validators.string`).

0 commit comments

Comments
 (0)