lua-schema
lua-schema copied to clipboard
How to limit the var can not be nil
Hi,
there is currently no schema for non-nil values, but it is easy to create, e.g. by using
notnil = schema.Test(function(obj) return obj ~= nil end, "must not be nil") schema.CheckSchema(value, notnil)
I might add a schema that checks for non-nil this weekend, if I have the time.