Welcome Guest, Not a member yet? Register   Sign In
Validate multiple input in CI 4
#8

I never tried it, but in your case:
PHP Code:
// The data to test:
'user_id' => [
    0 => 7,
    1 => 17,
]

$validation->setRules([
    'user_id.*' => 'required'
]); 
Reply


Messages In This Thread
Validate multiple input in CI 4 - by ciddict - 03-10-2021, 11:35 AM
RE: Validate multiple input in CI 4 - by demyr - 03-11-2021, 12:25 AM
RE: Validate multiple input in CI 4 - by ciddict - 03-11-2021, 12:57 AM
RE: Validate multiple input in CI 4 - by InsiteFX - 03-11-2021, 02:16 AM
RE: Validate multiple input in CI 4 - by ciddict - 03-11-2021, 02:49 AM
RE: Validate multiple input in CI 4 - by kenjis - 03-11-2021, 03:15 PM
RE: Validate multiple input in CI 4 - by ciddict - 03-12-2021, 07:20 AM
RE: Validate multiple input in CI 4 - by kenjis - 03-12-2021, 10:19 PM
RE: Validate multiple input in CI 4 - by ciddict - 03-13-2021, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB