views:

34

answers:

1

There seems to be a problem in FF when you use jquery.validty.js to validate my forms. If I'm validating a checkbox or radio btn the X image doesn't show up. It works in safari but I haven't tried IE. Has anyone had this problem?

<html>
<head>
    <title>Simple</title>
    <link type="text/css" rel="Stylesheet" href="css/jquery.validity.css" />
    <script src="http://code.jquery.com/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
    <script type="text/javascript" src="javascript/validate/jquery.validity.js"></script>
    <script type="text/javascript">
        $(function() { 
            $("form").validity(function() {
                $("#vehicles")
                    .require()
                    .match("number")
                    .range(4, 12);
                                    $("#butn").require();

                $("#dob")
                    .require()
                    .match("date")
                    .lessThanOrEqualTo(new Date());
            });
        });
    </script>
</head>
<body>
    <form method="get" action="simple.htm">
        Number of Vehicles:
        <input type="text" id="vehicles" name="vehicles" title="Vehicle Count" />
        <br /><br />
        Date of birth:
        <input type="text" id="dob" name="dob" title="Birthday" />
        <br /><br />
        <input type="radio" id="butn"/>
        <input type="submit" />
    </form>
</body>

A: 

So here the jist of it. You have to add your own functions to handle it.

$("#terms").assert($("#terms:checked").length != 0,'');

<input id='terms' type='radio' />
creocare