francescobruno-cmv/decimal-input
Decimal Input for Laravel provides a dedicated form field for decimal numbers, validating, formatting, and safely casting user input to and from PHP values so money and precision-sensitive fields stay consistent across Blade forms, requests, and models.
Package under evaluation: francescobruno-cmv/decimal-input 0.0.1 (MIT). A lightweight, Laravel-native component for decimal-aware form inputs — configurable precision, dot/comma locale parsing, Laravel validation and old() input integration, native step/min/max attributes, and Blade-friendly markup. Release notes for 0.0.1 contain only an auto-generated changelog link; there is no feature manifest, compatibility matrix, or test evidence in the published material. This is a baseline, evidence-thin assessment — treat conclusions as provisional pending the verification items in Key questions.
Architecture fit
, vs .), monetary and quantity entry, and the string-to-fixed-precision boundary between form input and persistence (DECIMAL(p,s) columns or integer minor units).Integration feasibility
composer require, service-provider auto-discovery). The real cost is deciding where normalisation lives — request layer, cast layer, or both — and enforcing that convention in review.Technical risk
0.0.x carries no semver stability guarantee; expect breaking changes on any minor bump. Exact pinning is mandatory.1,234 is accepted, downstream columns may truncate or coerce without error.Key questions
php and illuminate/* constraints, and which Laravel versions are actually exercised in CI?BcMath\Number, integer minor units, or native float? Float would be disqualifying for monetary use.null, or silently coerce?0.0.x releases, and who is the named maintainer?Stack fit
brick/math, bcmath); this package should only translate at the edge.Migration path
0.0.1.Compatibility
de-DE and en-US users must not reinterpret the same string differently on each side.Sequencing
DecimalInput facade or contract) so the dependency is swappable."1.234,56", "1,234.56", "1 234,56", ".5", "1e3", "-0", empty string, non-breaking spaces.DECIMAL(p,s) equals the value read back and re-rendered — this catches precision loss a unit suite can miss.Maintenance
0.0.x dependencies are how "temporary" packages become permanent liabilities. Assign one named maintainer at adoption time.Support
Scaling
Failure modes
"1,50" read as 150. Requires explicit multi-locale tests, not documentation.0.0.2 changes the public API. Mitigated by exact pinning plus the adapter.illuminate/* range. Surfaces at install time; low impact, easy to detect.Ramp-up
Recommendation: Adopt only for a single-surface pilot, at an exact pinned version, behind an internal adapter, in a non-critical-path form. Do not route monetary or regulated data through it at 0.0.1 until the internal representation is confirmed non-float, a test suite is verified, and release hygiene improves. Re-evaluate at 0.1.0 or on evidence of active maintenance.
How can I help you explore Laravel packages today?