Please clarify how to target the checkout input form specifically while user types in his data
Topic summary
Validating and limiting characters on existing Shopify checkout fields (email/first name) and whether client-side validation is possible.
- References shared for Shopify Functions–based checkout validation: create-simple-validation-rules and the GraphQL input schema (run(input), Cart → BuyerIdentity → Customer). Storefront API doesn’t expose these checkout inputs.
- OP aims for real-time, client-side checks while the buyer types on built-in fields and to block progress if length exceeds a threshold (e.g., 25 chars for first name). They cite supported checkout field targets but ask what client-side hook provides current input without DOM access.
- Access/permissions issue: OP found a theoretical approach (blog link) but can’t enable the required “level 2” access in a dev store’s API access tab; a screenshot is provided, suggesting scopes/permissions may be gating work. Clarification on Plus vs. dev store capabilities is inconsistent (initially asked if Plus is required; later said dev store testing is possible).
- Open questions remain: achieving client-side validation for existing fields via Checkout UI vs. server-side Functions, handling non-registered customers (BuyerIdentity → Customer may be absent), and resolving dev store access scopes.
- A third-party app (Address Ninja) was suggested for server-side email validation.
Status: Ongoing; no definitive resolution or action confirmed.