How would you validate a text input field for a twitter username, including the @ symbol? Technology Community › Category: AngularJS › How would you validate a text input field for a twitter username, including the @ symbol? 0 Vote Up Vote Down VietMX Staff asked 4 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.