Regular expression for password validation in JavaScript

Following example show that how we can validate password with the help of Regular Expression that have these validation:

Must be at least 10 characters
Must contain at least one one lower case letter,
one upper case letter,
one digit and one special character
Valid special characters are – @#$%^&+=

          <script type="text/javascript">  
          var reg = /^.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$/;  
          function PhoneValidation(phoneNumber)
            var OK = reg.exec(phoneNumber.value);  
            if (!OK)  
              window.alert("phone number isn't  valid");  
              window.alert("phone number is  valid");  
        <p>Enter your phone number and then press Enter.</p>  
        <form action="">  
          <input name="txtPhone" onchange="PhoneValidation(this);">  

More on Regular Expressions