Field-level validation errors reported throughDocumentation Index
Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
PrimerCardFormController.State.fieldErrors.
SyncValidationError
| Property | Type | Description |
|---|---|---|
inputElementType | PrimerInputElementType | Field that triggered the error |
errorId | String | Error identifier or message describing the validation failure |
PrimerInputElementType
| Value | Validation |
|---|---|
CARD_NUMBER | Luhn check + card network detection |
EXPIRY_DATE | MM/YY format, future date |
CVV | Correct length for card network (3 or 4 digits) |
CARDHOLDER_NAME | Non-empty when required |
COUNTRY_CODE | ISO 3166-1 alpha-2 |
FIRST_NAME | Non-empty |
LAST_NAME | Non-empty |
ADDRESS_LINE_1 | Non-empty |
ADDRESS_LINE_2 | Optional |
CITY | Non-empty |
STATE | Non-empty |
POSTAL_CODE | Format varies by country |
Validation timing
Fields validate on blur (when the user leaves a field), not while typing.isFormValid updates in real-time as the user types. fieldErrors only updates on blur. Use isFormValid for submit button state and fieldErrors for error messages.