I am trying to validate uk date input in a pHP form by using
$bret= $this->test_datatype($input_value,"/^(0[1-9]|[0-9]|3)[- ^\/.](0[1-9]|1)[- ^\/.](19|20)\d\d$/");
if(false == $bret)
$default_error_message = sprintf(E_VAL_UKDATE_CHECK_FAILED,$variable_name);
the test_datatype function is working with other validations, so I assume that the regex is not properly written. I found it by googling as I do not have knowledge of regex at all :-)
basically does not matter what I type, the test_datatype function return always true in this case
I think the issue is with \/ but I cannot figure it out what to change.
The format I am looking to validate is dd/mm/yyyy