Welcome Guest, Not a member yet? Register   Sign In
Validate input arrays


Can i know how to validate input arrays in Codeingiter 4?

PHP Code:
<?= form_dropdown(array('name' => 'upload_purpose[]''class' => 'form-control upload_purpose''options' => $cc_fileds)); ?>

PHP Code:
$rules = [
'upload_purpose[]' => ['label' => 'Upload Fields''rules' =>'required'],

I tried above an it doesn't work. it always displays the error message even though parameters were passed


CodeIgniter 4 User Guide - Validating Keys that are Arrays
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Theme © iAndrew 2016 - Forum software by © MyBB