Skip to content

Entities 0.4.16: Number fields that take a comma, with limits checked on the server

Entities 0.4.16 changes how number and decimal fields take input: a comma or a dot works as the decimal point, and the minimum and maximum of a number field are now checked on the server. It needs PhoenixKit 2.26 or later.

Number and decimal fields are now plain text boxes with a decimal keyboard on phones, not browser number inputs. Digits grouped in threes are accepted, and the browser’s step check no longer silently blocks a submit. A decimal field keeps the places that were typed, so 5,10 is stored as 5.10.

The min and max of a number field used to be checked only by the browser. The server now checks them in the admin and in public forms, which also store numbers in the same shape as the admin.

Values of 10¹² or more, or text longer than 64 bytes, are now refused. A record that already holds such a value fails validation on its next save; use a text field for values like millisecond timestamps. An unreadable min or max is now ignored instead of crashing saves.

Upgrading

Update PhoenixKit to 2.26 or later. Check number fields that store very large values before editing those records.

Full release notes: Entities 0.4.16

0.4.16 · 16 September 2026

Changed

  • Number and decimal fields use core’s <.decimal_input> (#49). They now render a text control with inputmode="decimal" in both the full form and FieldInput, not <input type="number">, and parse input with PhoenixKit.Utils.Number.parse_decimal/2. A comma or a dot works as the decimal point, 3-digit grouping is accepted, and the browser’s step check no longer silently blocks a submit. A decimal field keeps the scale that was typed (5,10 is stored as 5.10).
  • min/max are enforced on the server for number fields (#49). The browser used to be the only check. The public form endpoint now stores number/decimal values in the same shape as the admin form (a float or a Decimal) and applies the same bounds.
  • Values with a magnitude of 10¹² or more, or text longer than 64 bytes, are now rejected in number/decimal fields (core’s parse_decimal/2 guard). A record that already stores a larger value fails validation on its next save. Use a text field for values like millisecond timestamps.
  • Requires phoenix_kit 2.26 or later (~> 2.26). Earlier cores lack <.decimal_input> and Number.parse_decimal/2.
  • Dependency lock: phoenix_kit 2.26.1, phoenix_live_view 1.2.12, phoenix_kit_templates 0.1.2, swoosh 1.28.1.

Fixed

  • A field definition with an unreadable min/max ("", a typo, "NaN") no longer crashes saves of that entity’s records. The bound is ignored, as the form builder already documented.

Entities 0.4.16. Install or update: {:phoenix_kit_entities, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.