Validate

The Validate package contains interfaces and classes that can be used to create custom validation rules; such as rules based on combinations of the logical operators AND, OR and NOT.

Constants

ValidationResultType

Types of validation results generated by validation schemas.


Interfaces

IValidationRule

Interface for validation rules.

Validation rule used to validate one or multiple values against complex rules like: value is in a range, one property is less than another property, enforce enumerated values and more.

This interface allows to implement custom rules.


Classes

AndRule

Validation rule used to combine rules with AND logical operations. When all rules returns no errors, then this rule also returns no errors. When one of the rules returns errors, then the rules returns all errors.

ArraySchema

Schema to validate arrays.

AtLeastOneExistsRule

Validation rule that checks that at least one of the object properties is not null.

ExcludedRule

Validation rule that checkd that a value is excluded from a list of constants.

FilterParamsSchema

Schema to validate FilterParams

IncludedRule

Validation rule that checks that a value is included in a list of constants.

MapSchema

Schema to validate maps.

NotRule

Validation rule used to negate another rule.

ObjectComparator

Helper class to perform comparison operations over arbitrary values.

ObjectSchema

Schema to validate user defined objects.

OnlyOneExistsRule

Validation rule that checks that exactly one of the object properties is not null.

OrRule

Validation rule used to combine rules with OR logical operations.

PagingParamsSchema

Schema to validate PagingParams.

ProjectionParamsSchema

Schema to validate ProjectionParams

PropertiesComparisonRule

Validation rule that compares two object properties.

PropertySchema

Schema to validate object properties.

Schema

Basic schema that validates values against a set of validation rules. This schema is used as a basis for specific schemas to validate objects, project properties, arrays and maps.

ValidationException

Errors in schema validation. Validation errors are usually generated based on ValidationResult. If using strict mode, warnings will also raise validation exceptions.

ValidationResult

Result generated by a schema validation

ValueComparisonRule

Validation rule that compares a value to a constant.