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.

@FunctionalInterface public interface InputSanitizer
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

    Modifier and Type
    Method
    Description
    Returns a safe replacement for the supplied value.
  • Method Details

    • sanitize

      String sanitize(String input)
      Returns a safe replacement for the supplied value.
      Parameters:
      input - rejected string parameter value, never null
      Returns:
      replacement value, never null