All you need is required. Just remove minlength.

Jörn

On Thu, Feb 26, 2009 at 10:10 PM, paulswansea <sendtoswan...@hotmail.com> wrote:
>
> p.s. i just need the tick or cross instead of the default text, but if
> i remove the text from the messages :
>
>                messages : {
>                        country : {
>                                required : 'select country',
>                                minlength : 'choose a country'
>                        },
>                },
>
> to
>                messages : {
>                        country : {
>                                required : '',
>                                minlength : ''
>                        },
>                },
>
> the permanent cross changes into a permanent tick no matter what i
> select, it's fine with input boxes, but the select doesnt work the
> same way.
>
>
>
>
>
> On Feb 26, 9:04 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
> wrote:
>> You specify minlength:2 for a single-select. There is no way to select
>> more then one item in that select.
>>
>> Jörn
>>
>> On Thu, Feb 26, 2009 at 10:03 PM, paulswansea <sendtoswan...@hotmail.com> 
>> wrote:
>>
>> > sure, tryhttp://www.jondunlevy.com/seltest.html
>>
>> > On Feb 26, 8:54 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
>> > wrote:
>> >> Your code looks fine, could you post a testpage?
>>
>> >> Jörn
>>
>> >> On Thu, Feb 26, 2009 at 9:53 PM, paulswansea <sendtoswan...@hotmail.com> 
>> >> wrote:
>>
>> >> > I'm trying to get the validate plugin to work with a select box, but
>> >> > for some reason, it wont validate if i select a country, what am i
>> >> > doing wrong?
>>
>> >> > <form id="testform" method="post">
>> >> >        <select name="country" id="country">
>> >> >                <option value="">Select a country</option>
>> >> >                <option value="AF">Afghanistan</option>
>> >> >                <option value="AX">Aland Islands</option>
>> >> >                <option value="AL">Albania</option>
>> >> >                <option value="GB.WLS">Wales</option>
>> >> >        </select>
>> >> >        <input id="submitbtn" name="submitbtn" type="submit" />
>> >> > </form>
>> >> > <script type="text/javascript">
>> >> >        $('#testform').validate({
>> >> >                messages : {
>> >> >                        country : {
>> >> >                                required : 'select country',
>> >> >                                minlength : 'choose a country'
>> >> >                        },
>> >> >                },
>> >> >                rules : {
>> >> >                        country : {
>> >> >                                required : true,
>> >> >                                minlength: 2
>> >> >                        },
>> >> >                },
>> >> >                success: function(label) {
>> >> >                        label.html(" ").addClass("checked");
>> >> >                }
>>
>> >> >        });
>>
>> >> > </script>

Reply via email to