Form validation using java script fail in IE-7 but working fine in from IE-8 onwards
<p>I have a user registration page,in which the mandatory fields are validated using java script.it works fine in all browsers and IE-8,9 but it's not working in IE-7. </p>

<p>The issue arises when validating password match.Below is requirement for pass word match  </p>

<ol>
<li>Pass word contain at least one number</li>
<li>Letters not repeat</li>
<li>it contain special characters.</li>
<li>Pass word must contain at least 6 letters.</li>
</ol>

<p>Below is my code for validating the password match    </p>

<pre><code>function PasswordLenghtVal(pass)  // validating pass word length  
{
    if(/\d/.test(pass) &amp;&amp; pass.length &gt;= 6)
    {
        return true;
    }
    return false;
}

function FirstNonRepeatedChar(str)   //validating letters repeating or not  
{
    var i,j,repeated = 0;
    var len = str.length;

    for( i = 0; i &lt; len-1; i++ )
    {
        repeated = 0;
        if(str[i] == str[i+1] ) // checking for existing or not 
        {

        repeated = 1;
        break;
        }
    }
        if( repeated == 0 )  
            return true;       
        else
        return false;
}
</code></pre>

<p>This is code i have used for pass word match. Only problem in IE-7</p>
