How to compare field data with another
<p>I have a php form that gets validated through javascript. I would like to add another field to the form where the user has to confirm their email. How can I do this in the javascript validation file please?
Here is my current validation for the initial email form:</p>

<pre><code>this.setHandler('email',
        function (value) {
            regex=/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
            return regex.test(value);
        }
    );
</code></pre>
