Pip-Services-Commons-Dotnet
Public Member Functions | List of all members
PipServices3.Commons.Validate.IValidationRule Interface Reference

Interface for validation rules. More...

Inheritance diagram for PipServices3.Commons.Validate.IValidationRule:
PipServices3.Commons.Validate.AndRule PipServices3.Commons.Validate.AtLeastOneExistsRule PipServices3.Commons.Validate.ExcludedRule PipServices3.Commons.Validate.IncludedRule PipServices3.Commons.Validate.OnlyOneExistsRule PipServices3.Commons.Validate.OrRule PipServices3.Commons.Validate.PropertiesComparisonRule PipServices3.Commons.Validate.ValueComparisonRule

Public Member Functions

void Validate (string path, Schema schema, object value, List< ValidationResult > results)
 Validates a given value against this rule. More...
 

Detailed Description

Interface for validation rules.

Validation rule can validate one or multiple values against complex rules like: value is in range, one property is less than another property, enforce enumerated values and more. This interface allows to implement custom rules.

Member Function Documentation

◆ Validate()

void PipServices3.Commons.Validate.IValidationRule.Validate ( string  path,
Schema  schema,
object  value,
List< ValidationResult results 
)

Validates a given value against this rule.

Parameters
patha dot notation path to the value.
schemaa schema this rule is called from
valuea value to be validated.
resultsa list with validation results to add new results.

Implemented in PipServices3.Commons.Validate.PropertiesComparisonRule, PipServices3.Commons.Validate.AndRule, PipServices3.Commons.Validate.OrRule, PipServices3.Commons.Validate.AtLeastOneExistsRule, PipServices3.Commons.Validate.OnlyOneExistsRule, PipServices3.Commons.Validate.ValueComparisonRule, PipServices3.Commons.Validate.ExcludedRule, and PipServices3.Commons.Validate.IncludedRule.


The documentation for this interface was generated from the following file: