class PaymentMandateContentsValidator

Validator for PaymentMandateContents entities

Constructors

new
PaymentMandateContentsValidator(config?: ValidationConfig)

Properties

private
readonly
config: ValidationConfig

Methods

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

Check if PaymentMandateContents has expired based on timestamp PaymentMandates typically don't expire, but we check if timestamp is reasonable

Validate PaymentMandateContents

Validate field formats (ISO 8601 date, currency codes, etc.)

Validate the integrity of PaymentMandateContents by checking required fields

Validate merchant_agent format

Static Methods

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

Static method to check PaymentMandateContents expiry with default config

Static method to validate PaymentMandateContents with default config

Static method to validate PaymentMandateContents integrity with default config

Create a validator with custom configuration