Skip to content

Releases: redwirelabs/speck

v4.0.0

03 Nov 19:14

Choose a tag to compare

Adds the concept of an optional :merge_strategy to Attribute.merge(). This is used to determine which value to take from when a value is present in both the attributes and params. The strategy can be set to :param_priority (default), or :attribute_priority.

The behavior before this release was attribute priority.

v3.0.1

31 Oct 22:15

Choose a tag to compare

Fixes an issue so that optional :map attributes not supplied in the params are now present in the validated attributes with nil values.

v3.0.0

17 Sep 23:42

Choose a tag to compare

Optional booleans that are not present now return nil instead of false. This makes it easier to detect if the value was present.

attribute :param1, :boolean, optional: true

If the intent is to use spec to coerce an optional property to only true/false, use default:

attribute :param1, :boolean, default: false

v2.0.0

20 Aug 05:29

Choose a tag to compare

Added metadata to the return value of input validation. See the validation metadata section in the readme for more information.

v1.2.2

10 Jul 03:46

Choose a tag to compare

An optional list value returns nil if the incoming value is nil or not present.

v1.2.1

07 Apr 05:25
17c4a07

Choose a tag to compare

Fixes

  • Fix typespec on Speck.validate\2.

v1.2.0

17 Dec 04:40
8afd2b1

Choose a tag to compare

New features

  • Added :any attribute type.

Fixes

  • Added parenthesis to satisfy Elixir 1.17. #12

v1.1.0

12 Oct 19:54

Choose a tag to compare

Adds the strict validation feature, which requires the input types to match their spec's attribute type (no coercion).

v1.0.1

20 Aug 23:38

Choose a tag to compare

Fixes an issue where a maplist without the optional params would raise an exception.

v1.0.0

27 Apr 20:09

Choose a tag to compare

Production release.