CVV
3-digit security code; 4 digits when the linked card is an Amex.
← All examples·cvv
Preview
Form value: -
Display: -
Details
- Pattern:
999 · Amex 9999 - Preset:
"cvv" - Form value:
"123" - Error keys:
cvv.incomplete - Without a linked card it has 3 digits.
- See the credit card form example for the full setup.
Customization
Linking to the card
from must be a real field name; a wrong name is a type error.
const { card, cvv } = useViraMask(form, {
card: "card",
cvv: { preset: "cvv", from: "card" },
})For the hook API see useViraMask(); for your own pattern see custom mask.