I have a past date for a textbox
, and when I want to validate the form submit if the date is greater than the current date and has the format dd/mm/yyyy
.
in my form_validation.php:
'add_prod_serv_fact' => array(
'quantidade_prod' => array('field' => 'quantidade_prod', 'label' => 'Quantidade', 'rules' => 'required|trim|numeric|greater_than[0]|htmlspecialchars'),
'desconto_prod' => array('field' => 'desconto_prod', 'label' => 'Desconto', 'rules' => 'required|trim|numeric|greater_than[-1]|less_than[101]|htmlspecialchars'),
'date' => array('field' => 'date', 'label' => 'Date', 'rules' => 'required|trim|htmlspecialchars')
)
How do I validate the date?