[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: [ANN] Valua 0.2 - Validation for Lua
- From: Etiene Dalcol <dalcol@...>
- Date: Tue, 11 Mar 2014 20:59:16 +0000
I made this chained validation module. It's called valua and was originally bundled with another project of mine (Sailor MVC), but since it works separately, I sent it to the LuaRocks repository.
The validation objects are reusable and if a test fails at the beginning of the chain, it will break the chain and won't test the rest of it.
local valua = require "valua"
local test = valua:new().integer().min(18)
test(23.7) -- false
test(5) -- false