Class TValidatorBase
Unit
Declaration
type TValidatorBase = class(TInterfacedObject, IValidatorBase)
Description
Base class for any validation that needs to be implemented. Specification validations need to inherit from this class by convention from this library. It already has control for the successor validator as well as its automatic call at the appropriate time.
Hierarchy
- TInterfacedObject
- TValidatorBase
Overview
Methods
constructor Create; |
|
function Validate(ACommand: ICommandBuilder): TArray<string>; virtual; |
Properties
property Sucessor: IValidatorBase read GetSucessor write SetSucessor; |
Description
Methods
constructor Create; |
|
Default class constructor just to create a basic instance of it. It does not require a call to the desctructor as it is interface-based. |
function Validate(ACommand: ICommandBuilder): TArray<string>; virtual; |
|
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.
Parameters
|
Properties
property Sucessor: IValidatorBase read GetSucessor write SetSucessor; |
|
Allows you to set or access the successor validator. |
Generated by PasDoc 0.16.0.