livevalidation icon indicating copy to clipboard operation
livevalidation copied to clipboard

exclude default 'select' value in form select element

Open oshihirii opened this issue 11 years ago • 0 comments

Is it possible to exclude the default 'select' value in a form select element?

jQuery

var myVariable = new LiveValidation('my_id', { validMessage: 'valid input', wait: 500});
myVariable.add( Validate.Exclusion, { within: [ 'select' ] } );

HTML

<select required name="my_name" class="my_class" id="my_id">
<option selected value="select">select</option>
... other options
</select>

The above is not working, ie a valid message is shown when selecting an allowable option, but when selecting 'select' and moving on it is not raising validation errors.

oshihirii avatar Jul 11 '14 21:07 oshihirii