org.llm4s.agent.guardrails.builtin.RegexValidator
See theRegexValidator companion object
class RegexValidator(pattern: Regex, errorMessage: Option[String]) extends InputGuardrail, OutputGuardrail
Validates that content matches a regular expression.
Can be used for both input and output validation. Useful for enforcing format requirements like email addresses, phone numbers, or custom patterns.
Value parameters
- errorMessage
-
Optional custom error message
- pattern
-
The regex pattern to match
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait OutputGuardrailtrait InputGuardrailtrait Guardrail[String]class Objecttrait Matchableclass Any
Members list
In this article