|
Add ObjectAwareCleanser for cross-field @CustomSanitizer logic
The existing Cleanser<T> interface only sees a field's own value, so @CustomSanitizer couldn't support rules that depend on sibling fields (e.g. a postal code cleanser that behaves differently based on a country field on the same object). Adds ObjectAwareCleanser<T>, whose cleanse(Object owner, T value) also receives the owning object, and wires CustomSanitation to dispatch to it when present, falling back to the existing Cleanser path unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
|---|
|
|
| src/main/java/io/ljunggren/sanitizer/cleanser/ObjectAwareCleanser.java 0 → 100644 |
|---|
| src/main/java/io/ljunggren/sanitizer/sanitation/CustomSanitation.java |
|---|
| src/test/java/io/ljunggren/sanitizer/sanitation/CustomSanitationExtraTest.java |
|---|