Summary
Functions
A sample %MishkaPay.Checkout.Fields{} populated from defaults + type-based fallbacks.
Types
@type t() :: %MishkaPay.Checkout.Fields{ key: String.t(), label: String.t(), optional: boolean() | nil, options: [MishkaPay.Checkout.Fields.Options.t()] | nil, type: (:text | :numeric | :dropdown) | nil }
The struct that builder/1 returns.
| Field | Type | Required | Default | Description | Derives |
|---|---|---|---|---|---|
:key | String.t() | yes | sanitize(trim) validate(not_nil_value, string, not_empty, max_len=200, regex=\A[A-Za-z0-9]+\z) | ||
:label | String.t() | yes | sanitize(trim) validate(not_nil_value, string, not_empty, max_len=50) | ||
:type | :text | :numeric | :dropdown | nil | no | :text | validate(not_nil_value, enum=Atom[text::numeric::dropdown])<br>validator {MishkaPay.Checkout, :field_type} | |
:optional | boolean() | nil | no | false | validate(boolean) | |
:options | [MishkaPay.Checkout.Fields.Options.t()] | nil | no | validate(list, max_len=200) |