Skip to main content
Every element accepts an options object at creation time. This section documents the cross-cutting knobs that apply to multiple elements: required, validate, and localization primitives. For element-specific options, see each element’s reference page under Elements.

Cross-cutting knobs

Elements without required or validate

card, submitButton, applePay, googlePay, and checkout do not accept required, validate, or validateAsync at the top level or per-field.
  • card collects gateway-bound data. Every card field is always required; suppress optional fields (holderName, postalCode) via fields.<key>.hidden instead of toggling required-ness.
  • submitButton has no value to validate.
  • Wallet elements drive their own submission through the wallet sheet.
  • checkout composes other elements; configure required and validate on the individual slots (contact.email.required, billingAddress.validate, and so on).

Validation precedence

Providing a validate callback opts the element fully out of built-in checks: the built-in required check, the format schema, and any provider-level validity checks (like phone E.164 checks) are all skipped. The callback receives every value, including null for empty inputs, and owns the entire validity contract. To keep the built-in checks and add business rules on top, leave validate unset and gate your business logic inside your own onChange handler or on your server.

Debouncing

validate callbacks run debounced. The default is 250 ms; tune it per-instance:
The debouncer is latest-wins: rapid keystrokes coalesce into one trailing-edge call against the most recent value. Any pending callback is flushed synchronously on blur and on submit(), so submit-time error snapshots are always current. The synchronous required empty check is not debounced. Empty-required state notches immediately on the keystroke that clears the input.

See also

Last modified on July 17, 2026