bag
Validate HTTP input data in a fancy way
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Authors
- George Lemon
Installation
nimble install bag
choosenim install bag
git clone https://github.com/openpeeps/bag
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| bag | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 2.0.0 | No |
| valido#head | - | No |
| multipart#head | - | No |
| filetype | - | No |
Source
| Repository | https://github.com/openpeeps/bag |
|---|---|
| Homepage | https://github.com/openpeeps/bag |
| Registry Source | nimble_official |
README

Validate HTTP input data in a fancy way.
👑 Written in Nim language
nimble install bag
😍 Key Features
- [x] Macro-based webform validation
- [x] Framework agnostic
- [x] i18n support
- [x] Based on Valido package
- [x] Open Source |
MITLicense - [x] Written in 👑 Nim language
Examples
let data = @[
("email", "test@example.com"),
("password", "abc"),
("message", "Hello world")
]
withBag data:
email: tEmail"auth.error.email"
password: tPasswordStrength"weak.password"
message: tTextarea"msg.empty":
min: 10 or "msg.too.short"
max: 500 or "msg.too.long"
*remember: tCheckbox # optional, default false
csrf -> callback do(input: string) -> bool:
result = validateToken("/auth/login", input)
do:
if inputBag.isInvalid:
for (field, err) in inputBag.getErrors:
echo field, ": ", i18n(err)
See the full test suite for all 30+ supported field types.
❤ Contributions & Support
- 🐛 Found a bug? Create a new Issue
- 👋 Wanna help? Fork it!
🎩 License
Bag | MIT license. Made by Humans from OpenPeeps.
Copyright © OpenPeeps & Contributors — All rights reserved.