class IntentMandateValidator

Validator for IntentMandate entities

Constructors

new
IntentMandateValidator(config?: ValidationConfig)

Properties

private
readonly
config: ValidationConfig

Methods

checkExpiry(
intentMandate: IntentMandate,
currentDate?: Date,
): Promise<boolean>

Check if IntentMandate has expired

private
initializeDefaultRules(): void

Initialize default validation rules for IntentMandate

validate(intentMandate: IntentMandate): Promise<ValidationResult>

Validate IntentMandate structure and content

Validate the integrity of IntentMandate by checking required fields

Static Methods

checkExpiry(
mandate: IntentMandate,
currentDate?: Date,
): Promise<boolean>

Static method to check IntentMandate expiry with default config

Static method to validate IntentMandate with default config

Static method to validate IntentMandate integrity with default config

withConfig(config: ValidationConfig): IntentMandateValidator

Create a validator with custom configuration