# `MishkaPay.Checkout.Fields`
[🔗](https://github.com/mishka-group/mishka_pay/blob/v0.0.1/nofile#L1)

# `t`

```elixir
@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()]`](`t:MishkaPay.Checkout.Fields.Options.t/0`) \| `nil` | no |  |  | `validate(list, max_len=200)` |

# `builder`

# `enforce_keys`

# `enforce_keys`

# `example`

A sample %MishkaPay.Checkout.Fields{} populated from defaults + type-based fallbacks.

# `keys`

# `keys`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
