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.
cardcollects gateway-bound data. Every card field is always required; suppress optional fields (holderName,postalCode) viafields.<key>.hiddeninstead of toggling required-ness.submitButtonhas no value to validate.- Wallet elements drive their own submission through the wallet sheet.
checkoutcomposes other elements; configurerequiredandvalidateon the individual slots (contact.email.required,billingAddress.validate, and so on).
Validation precedence
Providing avalidate 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:
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.