GuardedStruct.Derive.ValidationDerive (GuardedStruct v0.1.7)

Copy Markdown View Source

Summary

Functions

Runs the validate ops of a field and returns {value, errors}. A field whose sanitizer raised arrives as its :sanitize error (see GuardedStruct.Derive.SanitizerDerive.call/2) and is reported as that error, without running the validate ops.

Functions

call(arg, actions, hint)

@spec call({atom(), any()}, [any()], String.t()) :: {any(), any()}

Runs the validate ops of a field and returns {value, errors}. A field whose sanitizer raised arrives as its :sanitize error (see GuardedStruct.Derive.SanitizerDerive.call/2) and is reported as that error, without running the validate ops.

convert_enum(list, splitter \\ "::")

validate(action, input, field)

@spec validate(atom() | tuple(), any(), atom()) :: any()