A validation rule, responsible for validating only a specific aspect of a single field for a PaymentRequest.

Hierarchy

Properties

Methods

Properties

id: string

The validation rule ID. This can be used for the ruleId field of ValidationErrors, or the result of validatePaymentRequest.

Methods

  • Validates a single field for a payment request. It can retrieve the field's value, but also if necessary other values, from the payment request.

    Parameters

    • request: PaymentRequest

      The request to validate a single field of.

    • fieldId: string

      The ID of the field to validate.

    Returns boolean

    True if the field's value in the payment request is valid, or false otherwise.