Welcome Guest, Not a member yet? Register   Sign In
form validation is_unique using array
#2

I don't think it can be used with an array, but maybe you can use a for loop with the check() function (https://codeigniter.com/user_guide/libra...te-1-value)

Something like this:
PHP Code:
foreach ($barcodes as $barcode)
{
    if ( ! 
$validation->check($barcode'is_unique[...todo add your table and field name...]'))
    {
        // Not unique
    
}

CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: form validation is_unique using array - by includebeer - 04-17-2021, 03:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB