Stannum
A library for defining and validating data structures.
Documentation
This is the documentation for the current development build of Stannum.
- For previous releases, see the Versions page.
Reference
Stannum defines the following core components for validating objects:
- Constraints
A validator object that checks whether a given object matches the constraint.
- Contracts
A collection of constraints that validate an object and its properties.
- Errors
A value object documenting the reasons why an object does not match a
constraint or contract.
In addition, Stannum defines the following components for defining data objects:
- Entities
A structured data object with a defined, typed set of properties.
- Attributes
A typed and validated property for an entity.
- Associations
Defining relationships between entities.
- Primary Keys
Setting a unique identifier for the entity.
- Validation
Leveraging Stannum’s contracts to validate entity properties.
For a full list of defined classes and objects, see Reference.