DEV Community

tu6ge
tu6ge

Posted on

Next rust validator, should be ergonomics and functional

valitron is an new validator, It has multiple features:

  • Ergonomics validation
  • Build-in rule, e.g. Required, StartWith ...
  • Closure validate
  • Related validate, e.g. password confirm
  • Custom rule with other parameter
  • Check / modify input data
  • Custom error message
  • collect validate error messages
  • Support all types data on #[dervic(Serialize, Deserialize)]

https://github.com/tu6ge/valitron

Top comments (1)

Collapse
 
tu6ge profile image
tu6ge

This is a custom validate rule example:
Image description