I want to make the mail is field required, but somehow its not working, am i missing something?
<div class="col-md-5 ">
<div class="control-group form-group">
<label class="control-label">
Escalation Email Ids
</label>
<div class="controls">
<?php $options=a rray(); if(count($useridsoptions)){ foreach($useridsoptions as $key=>$val){ $options[$key]=$val; } } echo form_dropdown('esc_users[]', $options, explode(",",$row->esc_users),'id="esc_users" class="form-control function col-md-12 select2", reqired="required" multiple'); ?>
</div>
</div>
</div>
Noticed several issues in code.
required
&array
spelling is wrong moreover wrong syntax used in last params inform_dropdown()
functionTry this
Codeigniter dropdown validation example
form validation rule
callback method