![]() |
CI4 validation greater_than on date field - 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: CI4 validation greater_than on date field (/showthread.php?tid=92764) |
CI4 validation greater_than on date field - pippuccio76 - 04-20-2025 HI , can i validate date with grater than ? this is my validation : Code: 'data_tour' => [ and this is the validation (not passed) : Data Partenza deve essere maggiore di oggi2025-04-21|2025-04-20 2025-04-21 is bigger than 2025-04-20... RE: CI4 validation greater_than on date field - grimpirate - 04-20-2025 Convert your date into a unix timestamp after validating it once as a valid date and then perform the greater_than validation. Alternatively, you could pass your dates in a specific format 'Ymd' and the comparison would work. RE: CI4 validation greater_than on date field - pippuccio76 - 04-20-2025 I create a custom rules: Code: <?php solved |