Just put at the div. The validation message will balloned at the label of selection. BUT THIS ONE IS NOT WORK ACTUALLY. WE JUST CANT DE-VALIDATED AGAIN. WHAT I DID TO SOLVE IT IS TO SET the first option to be Choose One.... Then using jQuery to read the value of being selected and alert for inserting the right value. I using onClick and $('#yourselectioncontrolId").focus(); You do not have to use Validation Engine Plugin for this. It was not design totally for jQueryMobile. You could edit their CSS to achieve better for JQM. But it gonna be a tedious work. Anyway, I am using it also on JQM project. But at certain level, it has its own limitation.
$('#districtName').on('focus', function (e) {
if ($('#malaysianState').val() == 'MY-00') {
alert('Please select any state first');
$('#malaysianState').focus();
}
e.preventDefault;
return false;
});
MY JQUERY MOBILE CONTROL WOULD BE
<div data-role="fieldcontain">
<label for="malaysianState" class="select">
<span lang="ms" id="stateName-label">Malaysian State</span>
</label>
<select name="malaysianState" id="malaysianState" data-native-menu="false">
<option value="NOT SELECTED" data-placeholder="true">Choose One...</option>
<option value="MY-01">Johor</option>
<option value="MY-02">Kedah</option>
<option value="MY-03">Kelantan</option>
<option value="MY-04">Melaka</option>
<option value="MY-05">Negeri Sembilan</option>
<option value="MY-07">Pulau Pinang</option>
<o
<option value="MY-16">WP Putrajaya</option>
</select>
</div>
<div id="districtName-label" lang="ms">Select District </div>
<input id="districtName" class="validate[required] text-input" />
<input type="hidden" id="districtName-id" />
<p></p>
<div>