I'm using codeigniter with PHP
.
I'm using following form,
<?php
echo form_open('/register/create_new', $form_params);
?>
DOB: <input type="text" id="dob" name="reg[dob]">
<input type="submit" value="Create Account" />
</form>
here, #dob
is in dd-mm-yyyy
format.
my validation code is,
array(
'field' => 'reg[dob]',
'label' => 'DOB',
'rules' => 'required'
)
How can i set the rules
for correct date validation?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…