How can I validate items in before invoice save?
I tried using callbacks but for some reason these are never fired, I wasted a few hours on this but no result.
I tried sending the items as an array since codeigniter does support based on the documentation but the problem was with jquery. Codeigniter expect items[0] => “snickers”, but jquery sends { name = “items[0]”, value=“snickers”}…
thanks for the reply.
I’m aware of these but this not the issue i’m facing.
the issue I’m facing is that when invoice is save the item are sent as json and I wasn’t able to run the validation rules on that json.
A couple of answers I found on stackoverflow recommended the use of callbacks, but like I said earlier callbacks are not fired for some reason. I tried it on multiple other fields, trying different scenarios but to reveal.
Is there anything missing that prevents callback from firing ?
Can you please give an example of how to use callbacks on ip?