LuaRocks.org had a security incident in September 2026. Read the incident report.

A type based validation library for Lua and luaCATS

$ luarocks install chotto

A TypeScript Zod-inspired validation library for Lua with luaCATS force type annotations!

'Chotto' means 'a little' in Japanese (**ちょっと**).
I hope this helps you 'a little' when adding types to Lua :D

- - -

local c = require('chotto')

-- Parse and validate
local string_result = c.string().parse('hello') -- ✓ returns 'hello'
local number_result = c.number().parse('hello') -- ✗ throws error because 'hello' is not a number
local boolean_result = c.boolean().parse(true) -- ✓ returns true

-- Safe validation with pcall -- when you don't want to throw errors
local ok, result = pcall(number_schema.parse, 10)
if ok then
print('Valid:', result) -- Valid: 10
else
print('Error:', result) -- Error message
end

Versions

main-17207 days ago13 downloads
main-16352 days ago22 downloads
main-151 year ago10 downloads
main-141 year ago7 downloads
main-131 year ago6 downloads
main-121 year ago7 downloads
main-111 year ago6 downloads
main-101 year ago6 downloads
main-81 year ago6 downloads
main-71 year ago7 downloads
main-61 year ago6 downloads
main-51 year ago6 downloads
main-41 year ago8 downloads
main-31 year ago7 downloads
main-21 year ago6 downloads

Labels

Manifests