Skip to main content

Module validation

Module validation 

Source
Expand description

Active Record-style validations.

Rust models have no shared base class, so a model opts in by implementing Validate and building an Errors with the provided validators (presence, length, …) or ad-hoc Errors::add calls.

Structs§

Errors
A collection of (field, message) validation errors (Rails model.errors).

Traits§

Validate
Implemented by models that can validate themselves.