formars-core 0.1.0

Typed schema primitives with a dyn-safe erased view for form validation.
Documentation
  • Coverage
  • 100%
    200 out of 200 items documented4 out of 113 items with examples
  • Size
  • Source code size: 180.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.7 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • edoriban/formars
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • edoriban

formars-core

Typed schema primitives with a dyn-safe erased view for form validation: builder-first composition (object(), string(), coerced::<T>(), ...), a Value tree with JSON interop behind the serde feature, path-addressed typed errors, and the Schema/DynSchema dual view.

use formars_core::prelude::*;

let schema = object().field("email", string().email());
assert!(schema.validate_value(&Value::from("nope")).len() == 1);

This crate is macro-free and dependency-light; formars-derive adds #[derive(FormSchema)] on top of it. See the repository and the formars facade for the full toolkit.

License: MIT — see LICENSE.