@mikezimm/fps-library-v2
Version:
Library of reusable typescript/javascript functions, interfaces and constants
63 lines • 2.03 kB
JavaScript
/**
Per ChatGPT, these are the explanation of common css masks
Phone Number: (999) 999-9999 means three digits followed by another three digits and four digits.
Social Security Number: 999-99-9999 means three digits, two digits, and four digits.
Date: 99/99/9999 means two digits for the month and day, and four digits for the year.
Time: 99:99 AA means two digits for the hour and minutes, with AM/PM as placeholders.
Zip Code: 99999 or 99999-9999 means five digits or five digits followed by four more.
Credit Card Number: 9999 9999 9999 9999 means four groups of four digits.
Currency: $9,999.99 means a dollar sign followed by digits and two decimal places.
Email Address: *{1,}@*{1,}.*{2,} means at least one character before and after the @ and at least two characters for the domain.
License Plate: AAA-9999 or 9999-AAA means a combination of letters and digits.
Driver's License Number: A999-999-999-999 means a single letter followed by three groups of digits.
*/
const inputMasks = [
{
name: "US Phone",
mask: "(999) 999-9999"
},
{
name: "SSN",
mask: "999-99-9999"
},
{
name: "Date YYYY-MM-DD",
mask: "9999-99-99"
},
{
name: "Date ##/##/YYYY",
mask: "99/99/9999"
},
{
name: "Time 12:25 AM",
mask: "99:99 AA" // Assuming AA is for AM/PM
},
{
name: "Expiration MM-YY",
mask: "99 99"
},
{
name: "US Zip Code",
mask: "99999[-9999]"
},
{
name: "Credit Card",
mask: "9999 9999 9999 9999"
},
{
name: "Currency",
mask: "$9,999.99"
},
{
name: "Email Address",
mask: "*{1,}@*{1,}.*{2,}"
},
{
name: "Driver's License Number",
mask: "A999-999-999-999"
}, {
name: "Integers",
mask: "9[9999999999999]"
},
];
//# sourceMappingURL=inputMasks.js.map