Welcome Guest, Not a member yet? Register   Sign In
Validation Issue
#6

(This post was last modified: 08-22-2024, 04:46 PM by kenjis.)

(08-22-2024, 12:16 PM)munggaran Wrote: Other bugs that I found is when I put only "trim" as validation then this will raise same error, I just want to make sure that user put something instead string with spaces, but this can be escalated by adding regex into validation for now. I read from internet trim in 4.0 was converted into boolean while 4.5.4 just null, this probably leads into validation error.

The trim() function accept a string as the first parameter.
See https://www.php.net/manual/en/function.t...escription

So if you pass other than a string value, now the error occurs.

Type checking in PHP is becoming stricter, so type checking in CI4 is also becoming stricter.
To avoid errors, please change so that only strings are passed.

Also, because CI4 does not change the data to be validated, specifying trim in the validation rules is meaningless even in 4.0.
Reply


Messages In This Thread
Validation Issue - by munggaran - 08-16-2024, 10:55 AM
RE: Validation Issue - by kenjis - 08-16-2024, 07:46 PM
RE: Validation Issue - by munggaran - 08-22-2024, 12:16 PM
RE: Validation Issue - by kenjis - 08-22-2024, 04:45 PM
RE: Validation Issue - by InsiteFX - 08-17-2024, 09:48 PM
RE: Validation Issue - by kenjis - 08-22-2024, 04:39 PM
RE: Validation Issue - by nahaK - 12-14-2024, 03:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB