Expand description
This is a library for validating data entry forms in a user interface.
Typically to use this library, you would implement Validatable for your form, and in the implementation use a Validator for each field in the form, and concatinating the results with concat_results().
§Optional Features
"stdweb-support"
- enable support for stdweb on thewasm32-unknown-unknown
platform."wasm-bindgen-support"
- enable for wasm-bindgen on thewasm32-unknown-unknown
platform."async"
- enable an asynchronous version of this API, and conversion traits from synchronous to asynchronous.
Structs§
- Async
Validator async
- Validates a particular type of value asynchronously, can contain many validation functions. Generally used with a single key for all contained validation functions.
- Async
Validator Fn async
- An function to perform validation on a field asynchonously.
- Validation
Error - An error associated with a form field.
- Validation
Errors - A collection of ValidationErrors as a result of validating the fields of a form.
- Validator
- Validates a particular type of value, can contain many validation functions. Generally used with a single key for all contained validation functions.
- Validator
Fn - Function to perform validation on a form field.
Traits§
- Async
Validatable async
- An item that can be validated asynchronously.
- Validatable
- An item that can be validated.
- Validation
- A function/struct/item that can perform validation on an item with
a given
Value
type.
Functions§
- concat_
results - Join validation results, concatinating any errors they may
contain. If any of the results are an
Err
it will return anErr
containing all the errors from all the results.