Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

validation pattern for a credit card field that goes like this...

Avatar

Level 2

1.  I just need a validation pattern for a credit card field that puts dashes between each set of 4 and also allows customer to hit the space bar, but puts a dash in place of the space bar as they're typing. This will be the display, edit, validation etc. Thanks for your help.

P.S. I know  some cards are 16 digit (MC and V), some are 15 (Amex) and don't know  about others if maybe more than 16. So I think (?) adding the dash after  each 4 would do it...thanks for your help in providing a pattern I can  paste into those 4 areas.

2.  Also, a much simpler issue, when I make fields "required", they're already showing a red border even before you get to the fields. I only want the red box (and notice) to show if they forget to fill them in when they hit the Email submit or Print buttons.

Thanks in advance.

0 Replies