Hi,

I am trying the forms validation plugin and cannot figure out where I
am going wrong with it
I can get cross validation working aginst a checkbox but I am unable
to get it working against an input box
HTML is supplied below
The rules metadata is below the HTML
Any help is much appreciated
Andy

<fieldset>
            <legend>Test JQuery validation</legend>
            <ol>
                <li>
                    <label for="cbox">Last Months Bank Statement: </
label>
                    <input type="checkbox" value="true" name="cbox"
id="cbox"/><input type="hidden" value="false" name="cbox"/
>
                </li>
                <li>
                    <label for="source">Source: </label>
                    <input type="text" value="" name="source"
id="source"/>
                </li>
                <li>
                    <label for="date">Date: </label>
                    <input type="text" value="" name="date" id="date"/
>
                </li>
                <li>
                    <label for="amntPaidIn">Amount Paid In: </label>
                    <input type="text" value="" name="amntPaidIn"
id="amntPaidIn"/>
                </li>
            </ol>
            <input type="submit" value="validate"/>

        </fieldset>

    rules: {
        source: {
          required: "#cbox:checked",//works
          minlength: 2
      }
      , date: {
          required: "#source:filled",//not working
          minlength: 2
      }
      , amntPaidIn: {
          required: true,
          email: true
      }
    }, debug: true

Reply via email to