BitcrowdEcto. FixedWidthInteger
(bitcrowd_ecto v1.2.0)
View Source
An Ecto type that automatically validates that the given integer fits the underlying DB type.
This turns the ugly Postgrex errors into neat validation: :cast changeset errors without
having to manually validate_number all :integer fields.
Named widths are based on Postgres' integer types.
https://www.postgresql.org/docs/current/datatype-numeric.html