How would you validate a text input field for a twitter username, including the @ symbol?

Technology CommunityCategory: AngularJSHow would you validate a text input field for a twitter username, including the @ symbol?
VietMX Staff asked 3 years ago

We should use the ngPattern directive to perform a regex match that matches Twitter usernames. The same principal can be applied to validating phone numbers, serial numbers, barcodes, zip codes and any other text input.