Validate HTTP input data in a fancy way.
👑 Written in Nim language
nimble install bag
- Macro-based validation
- Framework agnostic
- i18n support
- Based on Valido package
- Open Source |
MIT
License - Written in 👑 Nim language
# can be a seq/array containing a key/value tuple (string, string)
var data = [("email", "test@example.com"), ("password", "123admin")]
# create a new bag
bag data:
email: tEmail or "auth.error.email"
password: tPassword or "auth.error.password":
min: 8 or "auth.error.password.min"
*remember: tCheckbox # `*` prefix makes field optional
do:
for err in inputBag.getErrors:
echo err
For more examples, check in unittests
- 🐛 Found a bug? Create a new Issue
- 👋 Wanna help? Fork it!
- 😎 Get €20 in cloud credits from Hetzner
- 🥰 Donate via PayPal address
Bag | MIT license. Made by Humans from OpenPeeps.
Copyright © 2024 OpenPeeps & Contributors — All rights reserved.