Welcome Guest, Not a member yet? Register   Sign In
Pre format rules ignored - CI4 Validation
#1

Hi Team,

If I apply any rule to CI4 Validation that returns string instead of boolean, that rule is skipped. No effect on data output / formatting.

Like this.

PHP Code:
$validation->setRules([
    'username' => 'trim|required',
    'password' => 'required|min_length[10]'
]); 

PHP Code:
$request->getPostGet('username'); // Username is not trimmed. 

This used to be working fine in CI3. How can I attain the same in CI4?
Reply


Messages In This Thread
Pre format rules ignored - CI4 Validation - by SammieL - 10-23-2020, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB