Closed jitendraV closed 11 years ago
Check the example on the documentation https://github.com/elclanrs/jq-idealforms#example.
You can see how it's setup, you need to use the exclude
filter with the value of the default option, typically default
:
<select name="categories">
<option value="default">Select a Category</option>
<?php // dynamic options ?>
</select>
Options in the plugin:
'categories': {
filters: 'exclude',
data: { exclude: ['default'] },
errors: { exclude: 'Choose a category from the list.' }
},
Hello, I am fetching the category dynamically and displaying in the dropdown. So i need validation if no category selected.
This is my view
Validation
'Subcategory[]': { filters: 'exclude', data: { exclude: ['default'] }, errors : { exclude: 'Select Subcategory.' } },
Please suggest where am doing wrong. Thanx.