Special Input masks on text fields
I've had a few people asking about the best way to handle input masks (pictures in VFP speak).
There are a few special input masks that I think are worth mentioning as they are time savers.
Convert all input to uppercase:
@!
Accept alpha characters only:
@A
Accept alphanumeric:
@X
ISO date YYYY-MM-DD:
@D
Integer value with maxlength,minvalue,maxvalue:
@I10,100,1000
Double value with maxlength,maxdecimals,minvalue,maxvalue:
@F10,2,0,10000
Valid email address:
@E
Any regular expression starts with a ?. The example below validates an email address:
?\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b
VFP-style picture characters:
!
A
9
X