valid_date not working as expected - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: valid_date not working as expected (/showthread.php?tid=79054) |
valid_date not working as expected - sfarzoso - 04-14-2021 I'm trying to validate this date: 14/04/2021 16:00, so inside the validation rules of the controller I did: PHP Code: $validationRules = [ the problem's that when the code reach this line: PHP Code: if (!$this->validate($validationRules)) { The field published_date must contains a valid date RE: valid_date not working as expected - pars1997 - 04-14-2021 you have to use i for minute (d/m/Y H:i). more info: https://www.php.net/manual/en/datetime.format.php |