Package com.tnsai.guardrails
Interface InputSanitizer
- All Known Implementing Classes:
PiiInputSanitizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Rewrites one string-valued action parameter before dispatch.
Implementations declared through InputGuardrail.sanitizers()
must expose a public no-argument constructor. Sanitizers run in declaration order when a
validator rejects a value and the guardrail uses FailureAction.SANITIZE.
- Since:
- 0.14.0 (TAN-3016)
-
Method Summary
-
Method Details
-
sanitize
Returns a safe replacement for the supplied value.- Parameters:
input- rejected string parameter value, nevernull- Returns:
- replacement value, never
null
-