Expiry date
MM/YY. Corrected while typing (2 → 02/); past months are invalid.
← All examples·expiry
Built-in validation: Expiry check
Month 13 can't be typed and 2 becomes 02/ while typing. A past month returns expiry.min.
Preview
Form value: -
Display: -
Details
- Pattern:
99/99 - Preset:
"expiry" - Form value:
"1228" - Error keys:
expiry.incomplete,expiry.invalid,expiry.min - The month can't pass 12; typing 13 drops the 3.
For the hook API see useViraMask(); for your own pattern see custom mask.