Package com.embabel.agent.core
Interface PropertyValidationRule
-
- All Implemented Interfaces:
public interface PropertyValidationRuleType-safe validation rule interface for property validation. Implement this interface to create custom validation rules.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanisValid(String mention)Check if the mention is valid according to this rule. StringfailureReason(String mention)Get the failure reason for an invalid mention. abstract StringgetDescription()Human-readable description of this rule. -
-
Method Detail
-
isValid
abstract Boolean isValid(String mention)
Check if the mention is valid according to this rule.
- Parameters:
mention- The mention text to validate- Returns:
true if valid, false otherwise
-
failureReason
String failureReason(String mention)
Get the failure reason for an invalid mention.
- Parameters:
mention- The mention text that failed validation- Returns:
Human-readable description of why validation failed
-
getDescription
abstract String getDescription()
Human-readable description of this rule.
-
-
-
-