Skip to content
/ bag Public
generated from openpeeps/pistachio

Validate form input data in a fancy way. Written in Nim language

License

Notifications You must be signed in to change notification settings

openpeeps/bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Validate HTTP input data in a fancy way.
👑 Written in Nim language

nimble install bag

API reference
Github Actions | Github Actions

😍 Key Features

  • Macro-based validation
  • Framework agnostic
  • i18n support
  • Based on Valido package
  • Open Source | MIT License
  • Written in 👑 Nim language

Examples

# 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

❤ Contributions & Support

🎩 License

Bag | MIT license. Made by Humans from OpenPeeps.
Copyright © 2024 OpenPeeps & Contributors — All rights reserved.

Releases

No releases published

Packages

No packages published

Languages