Skip to content

exclude default 'select' value in form select element #20

@oshihirii

Description

@oshihirii

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions