Skip to content

Package io.github.qishr.cascara.schema.rule

Class RegexRule

java.lang.Object
        io.github.qishr.cascara.schema.rule.AbstractValidationRule
                io.github.qishr.cascara.schema.rule.RegexRule

All Implemented Interfaces:
    ValidationRule


public class RegexRule
extends AbstractValidationRule

Constructor Summary

Constructor Description
RegexRule(String pattern)

Method Summary

Modifier and Type Method Description
public boolean validate(AstNode node, String path, Reporter reporter)
public boolean validateValue(Object value, String path, Reporter reporter)
public Pattern getPattern()
public String getPatternString()

Methods inherited from AbstractValidationRule

error, error

Method Details

validate

public boolean validate(AstNode node, String path, Reporter reporter)

Specified By:

ValidationRule


validateValue

public boolean validateValue(Object value, String path, Reporter reporter)

Specified By:

ValidationRule


getPattern

public Pattern getPattern()


getPatternString

public String getPatternString()