Regular expression validating date
A lot of websites now require registration, meaning that users need to be assigned a username and password.Here are some simple steps to make the process more secure.In most browsers - those that support Java Script 1.5 (Firefox, Chrome, Safari, Opera 7 and Internet Explorer 8 and higher) - you can use more powerful regular expressions. The code presented above is fine in that it checks everything that we wanted to check, but uses a lot of code to test each requirement individually and present different error messages.
The simplest way to do this is to have the password entered twice, and then check that they are identical.
For security a password should never be displayed in HTML or sent by email.
If you're concerned about security you should have some policy on what constitutes a valid password.
In some cases, such as on mobile devices, displaying the password may improve usability without compromising security.
After all it's only the browser display being obfuscated and not the data transfer.