getPost() not working as expected |
(10-29-2020, 09:38 AM)paulbalandan Wrote: If the field is optional, then you can add the permit_empty rule.Thanks Paul, I really appreciate you comments, but how do i validate if I can't even get hold of the value, my issue isn't validation it is with the $this->request->getPost() statement. Are we saying that when a form value is empty, ie PHP Code: <input type="text" name="first_name" value="" /> the statement PHP Code: if($this->request->getPost('first_name')) { .. is FALSE ??? Surely the value is "empty"! And, if I then validate PHP Code: $this->request->getPost('first_name') my rules should validate against an empty value (like you suggested)? Or, am I missing something??? Sorry to be a pain :-) |
Messages In This Thread |
getPost() not working as expected - by 68thorby68 - 10-29-2020, 03:01 AM
RE: getPost() not working as expected - by InsiteFX - 10-29-2020, 03:31 AM
RE: getPost() not working as expected - by 68thorby68 - 10-29-2020, 04:22 AM
RE: getPost() not working as expected - by paulbalandan - 10-29-2020, 09:38 AM
RE: getPost() not working as expected - by 68thorby68 - 10-29-2020, 12:05 PM
RE: getPost() not working as expected - by ojmichael - 10-29-2020, 04:09 PM
RE: getPost() not working as expected - by 68thorby68 - 10-30-2020, 02:09 AM
|