footings.validators.equal_to

equal_to(value)[source]

A validator that raises a ValueError if the initializer is called with a value that is not equal to the value provided.

Can be used under both a DataDictionary and a Model.

Parameters

value (Any) – The value to compare for equality..

Raises

ValueError – With a human readable error message, the attribute (of type attr.Attribute), the equality value, and the value passed.