Welcome Guest, Not a member yet? Register   Sign In
Form Validartion with input array
#3

(05-11-2020, 10:10 AM)jreklund Wrote: Those function only works with an string, as the error messages states. You need to create your own validation rule, that foreach your array and on each item check numeric().

https://codeigniter.com/user_guide/libra...parameters

Create a array_numeric function. And pass it along as array_numeric[], as you will need to have access to the $data array.

[] in this case are used for optional parameters, it dosen't tell CodeIgniter that the input are an array or not.
 
Oh, thanks, I thought that it would work as CI3 did with the input names with [].

I have an idea to do that to all kind of rules I'm gonna try that, thanks again.
Reply


Messages In This Thread
RE: Form Validartion with input array - by Misael Picco - 05-11-2020, 11:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB