You can avoid these headaches once and for all with Java Script's amazing way to combat bad form data with a technique called "form validation".
The HTML behind this would look something like the following: Moving beyond the basic Angular JS stuff, lets get down to the good stuff.
We’re going to make use of two different Reg Ex validation strings.
Use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and are getting it from another source, such as user input.
A regular expression pattern is composed of simple characters, such as .
If the regular expression remains constant, using this can improve performance.
Or calling the constructor function of the Using the constructor function provides runtime compilation of the regular expression.
Simple patterns are constructed of characters for which you want to find a direct match.
For example, the pattern matches character combinations in strings only when exactly the characters 'abc' occur together and in that order.
One string will represent what is required for creating a strong password and the other will represent what is necessary for creating a medium strength password.
If neither expressions are satisfied, we’ll assume it is poor strength.
The last example includes parentheses which are used as a memory device.