Interface IValidatorBase

Unit

Declaration

type IValidatorBase = interface(IInterface)

Description

Base interface for any validation that needs to be implemented. Specification validations need to inherit from this interface by convention from this library. It already has control for the successor validator as well as its automatic call at the appropriate time.

Attributes
GUID['{223310E5-CDB9-4BCF-B87B-599384ADF983}']

Hierarchy

Overview

Methods

Public function GetSucessor: IValidatorBase;
Public procedure SetSucessor(const AValue: IValidatorBase);
Public function Validate(ACommand: ICommandBuilder): TArray<string>;

Properties

Public property Sucessor: IValidatorBase read GetSucessor write SetSucessor;

Description

Methods

Public function GetSucessor: IValidatorBase;
 
Public procedure SetSucessor(const AValue: IValidatorBase);
 
Public function Validate(ACommand: ICommandBuilder): TArray<string>;

Validates a single specific case. It must be implemented by the child class. If the validation is successful and there is a successor, the successor's validation method will be called. A TArry<string> will be returned with errors detected whether they are from the current or successor validation.

CommandBuilder instance containing the arguments, commands and options configured to be validated against the arguments passed to it.)

Properties

Public property Sucessor: IValidatorBase read GetSucessor write SetSucessor;

Allows you to set or access the successor validator.


Generated by PasDoc 0.16.0.