Package com.tnsai.guardrails
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.
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 TypeMethodDescriptionbooleanReturns whether the value is safe to dispatch.default booleanReturns whether this validator also protects parameter names before value validation.
-
Method Details
-
isValid
Returns whether the value is safe to dispatch.- Parameters:
input- string parameter value, nevernull- Returns:
truewhen 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:
truewhen parameter names must passisValid(String)
-