If you distribute copies of this software you may not change the copyright or license of this software.
ng-class is the Angular directive used to apply class on the elements based upon the evaluated expression.
The best way to confirm an email address is to email the user, and get the user to reply by clicking on a link to validate that they have recieved the email (the way most sign-up systems work). You should prevent XSS exploits, SQL injection and so on by escaping correctly when inserting strings into a different language where some characters are "magic", eg, when inserting strings in HTML or SQL.
The regex to confirm the syntax is correct can be very long (see example).