index.tsx305 chars12 linesIn the above code block, we define a regular expression that matches the standard US phone number format, which is ###-###-####. We then define a function called validatePhoneNumber which takes an input phone number and returns true if it matches the expected format or false if it does not.
gistlibby LogSnag