Skip to content

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

Interface ValidationRule

java.lang.Object
        io.github.qishr.cascara.schema.rule.ValidationRule

All Known Implementing Classes:
    MinItemsRule, FileExtensionRule, RequiredRule, MaxItemsRule, MaxLengthRule, EnumRule, MaxValueRule, TypeRule, MinValueRule, UniqueItemsRule, MinLengthRule, RegexRule


public interface ValidationRule

Method Summary

Modifier and Type Method Description
public abstract void validate(AstNode node, String path, ValidationResult result) Validates a node and adds errors to the result if necessary.
public default boolean isValid(Object value) Legacy support or simple checks .
public default void validateValue(Object value, String path, ValidationResult result)

Method Details

validate

public abstract void validate(AstNode node, String path, ValidationResult result)

Validates a node and adds errors to the result if necessary.


isValid

public default boolean isValid(Object value)

Legacy support or simple checks .


validateValue

public default void validateValue(Object value, String path, ValidationResult result)