CodeIgniter Forums
Form Validation - 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: Form Validation (/showthread.php?tid=86119)



Form Validation - motoroller - 01-11-2023

I have updated to 4.3

My rules for price (float)

'price' => [
'label' => ' ',
'rules' => 'required|numeric|greater_than[0]|less_than[1000000]'
],


now i can`t pass greater_than[0]|less_than[1000000]

how to pass float val?


RE: Form Validation - kenjis - 01-11-2023

It seems a bug in Strict Rules.

Use Traditional Rules until it is fixed.
https://codeigniter4.github.io/CodeIgniter4/libraries/validation.html#traditional-and-strict-rules

I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/7098
Test it if you can.