validateForRequiredFields

Verify a Billing payload satisfies every field in requiredFields. Returns null when valid, or an InvalidParamsException describing the first missing/ invalid field. Mirrors the iOS validation rules in AWXDefaultProvider+Extensions.swift.

This is the card-flow validator only. Google Pay billing is configured via com.airwallex.android.core.GooglePayOptions and validated separately by Google Pay itself — this function is not invoked on the Google Pay path.

  • NAME: firstName must be non-blank.

  • EMAIL: must match the SDK's email regex.

  • PHONE: must match the E.164 shape (+?[1-9]\d{1,14}); the leading + is optional

  • ADDRESS: street, city, state, postcode all non-blank, plus a 2-letter uppercase ISO country code.

  • COUNTRY_CODE: 2-letter uppercase ISO country code (suppressed when ADDRESS is also required — ADDRESS already covers it).