Import
import { Field } from '@dnb/eufemia/extensions/forms'render(<Field.Expiry />)
Description
Field.Expiry is a wrapper component for the input of strings, with user experience tailored for expiry dates for payment cards.
It supports the HTML autocomplete attribute, and by default set it to cc-exp-month for the month field, and to cc-exp-year for the year field.
Relevant links
Validators
Internal validators exposed
Field.Expiry exposes the expiryValidator validator through its onBlurValidator property, take a look at this demo.
The expiryValidator validator, validates invalid month and/or year.