#serde-json #forms #validation #json

rustforms

Universal form validation compatible with json and hashmap input types

1 stable release

Uses new Rust 2024

1.0.1 Oct 19, 2025

#2107 in Web programming

MIT license

9KB
184 lines

rustforms

A lightweight Rust crate for validating form input using JSON and HashMap mappings. Designed for extensibility, clarity, and real-world use cases.

Features

  • Validate fields with built-in rules: Required, MinLength, MaxLength, Email, Range, Regex
  • Convert serde_json::Value into HashMap<String, String> for easy validation
  • Customize error messages using an optional translation map
  • Fully tested with unit and integration tests

Installation

cargo add rustforms

Dependencies

~2.3–4MB
~68K SLoC