Interface InputValidator

All Known Implementing Classes:
PiiInputValidator
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 InputValidator
Validates one string-valued action parameter before dispatch.

Implementations declared through InputGuardrail.validators() must expose a public no-argument constructor and must not retain the inspected value. Returning false delegates disposition to the guardrail's configured failure action.

Since:
0.14.0 (TAN-3016)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isValid(String input)
    Returns whether the value is safe to dispatch.
    default boolean
    Returns whether this validator also protects parameter names before value validation.
  • Method Details

    • isValid

      boolean isValid(String input)
      Returns whether the value is safe to dispatch.
      Parameters:
      input - string parameter value, never null
      Returns:
      true when the value may continue through the action pipeline
    • validatesParameterNames

      default boolean validatesParameterNames()
      Returns whether this validator also protects parameter names before value validation. Domain validators normally leave this disabled; security classifiers that treat keys as user-visible prompt data may opt in.
      Returns:
      true when parameter names must pass isValid(String)