shiva-validator

Rule-based data validator for Lua 5.4

$ luarocks install shiva-validator

Validates tables of data against declarative rule sets, inspired by
Laravel's validator. Rules are pipe-delimited strings or tables:
'required|string|min:3|max:100'. Built-in rules cover type checking
(string, number, integer, boolean, table, array), size constraints
(min, max, size, between), and format validation (alpha, alphaNum,
alphaDash, numeric, email, url, in, notIn). Custom rules can be
registered with Validator.extend(). Returns a ValidationResult with
passes(), fails(), errors(), firstError(), and allErrors().

Versions

0.1.0-116 hours ago0 downloads

Dependencies

lua >= 5.4

Manifests