Interface ValidationRuleBoletoBancarioRequiredness

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

Hierarchy

Properties

fiscalNumberLength: number
id: "boletoBancarioRequiredness"

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.

  • Validates a single value.

    Parameters

    • value: string

      The value to validate.

    • Optional fiscalNumber: string

      The fiscal number that is used to determine whether or not this validation rule applies.

    Returns boolean

    True if the value is valid for the given fiscal number, or false otherwise.