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

Hi,

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
Reply
#2

SEE:

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 )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB