Here's another take on argument validation, written in C. It focuses on being unobtrusive in the code, rather than offering very sophisticated validation options. When a function is called with incorrect parameters, it will produce an error formatted as those produced by the plain Lua checking APIs "luaL_checkxxx(L, idx)".
The file is self-sufficient; its usage is described in its first comment block; it is available under the MIT licence.
In a nutshell, if a function expects as arguments a number, followed by an optional string, then finally either a table or a boolean, it can be protected by calling: