mirror of
https://github.com/Respect/Validation.git
synced 2026-03-18 08:09:51 +01:00
Because of how the validation engine works now [1], there's no reason to
keep adding names to each rule. Instead, create a single rule that
handles naming rules with a few other accessories. This change is not
necessarily simple, but it shrinks the `Rule` interface, and it's more
aligned with how the library works right now.
Personally, I think this API is much more straightforward than the
`setName()` method, as it's way more explicit about which rule we're
naming. Because of this change, the behaviour changed slightly, but it's
for the best.
Because of this change, I managed to remove a lot of code, but
unfortunately, it's quite a big-bang commit. It would be too complicated
to make it atomic since names are an intrinsic part of the library.
[1]:
|
||
|---|---|---|
| .. | ||
| rules | ||
| 01-installation.md | ||
| 02-feature-guide.md | ||
| 03-handling-exceptions.md | ||
| 04-message-translation.md | ||
| 05-message-placeholder-conversion.md | ||
| 06-concrete-api.md | ||
| 07-custom-rules.md | ||
| 08-comparable-values.md | ||
| 09-list-of-rules-by-category.md | ||
| 10-license.md | ||
| index.md | ||