Tables are unpacked to allow multiple arguments to be specified, which means a single table cannot be passed as THE argument.
I was attempting to pass a hash table as an argument to a validation function, but as a table passed as an argument to a validation function is passed through unpack, my hash table was sent as zero arguments instead. I understand why it works this way, but it was frustrating to find out the hard way I could not do what I intended.
I was attempting to pass a hash table as an argument to a validation function, but as a table passed as an argument to a validation function is passed through
unpack
, my hash table was sent as zero arguments instead. I understand why it works this way, but it was frustrating to find out the hard way I could not do what I intended.