[][src]Crate form_validation

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 the wasm32-unknown-unknown flatform.
  • "wasm-bindgen-support" - enable for wasm-bindgen on the wasm32-unknown-unknown flatform.

Structs

ValidationError

An error associated with a form field.

ValidationErrors

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.

ValidatorFn

Function to perform validation on a form field.

Traits

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 an Err containing all the errors from all th results.