Skip to content

Add type validation for record fields if types are present #16

@define-null

Description

@define-null

I'd like to suggest the following: to add automatic type validation based on the field type if present, with an approach like here: https://github.com/extend/sheriff/blob/master/src/sheriff.erl#L144
Together with support for optional validators that are already present it would add much more flexibility for validation.

I potentially keep in mind usecases like the following:

currency :: binary() | disabled %% <<"EUR">>, <<"USD">>

Where binary and disabled are checked by automic validation and then EUR and USD are checked by user-provided validation.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions