Package io.github.qishr.cascara.schema.rule
Class EnumRule
java.lang.Object
io.github.qishr.cascara.schema.rule.EnumRule
All Implemented Interfaces:
ValidationRule
public class EnumRule
Constructor Summary
| Constructor | Description |
|---|---|
| EnumRule(List<String> allowedValues) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public void | validate(AstNode node, String path, ValidationResult result) | |
| public void | validateValue(Object value, String path, ValidationResult result) | |
| public List<String> | getAllowedValues() |
Method Details
validate
public void validate(AstNode node, String path, ValidationResult result)
Specified By:
validateValue
public void validateValue(Object value, String path, ValidationResult result)
Specified By:
getAllowedValues
public List<String> getAllowedValues()