- What is francescobruno-cmv/decimal-input used for in Laravel?
- It is a Laravel Blade component for decimal and money inputs. It is intended to handle locale-aware separators, precision, and formatting so users can enter values naturally while the application receives clean numeric data. It fits presentation and input-boundary use cases such as pricing admin, invoicing, inventory quantities, and expense entry.
- How do I install francescobruno-cmv/decimal-input?
- Install it with Composer using composer require francescobruno-cmv/decimal-input. Laravel package auto-discovery should register any service provider automatically, but the 0.0.1 release metadata does not publish detailed setup notes. Check the repository for required configuration or publishing steps before relying on it.
- Which Laravel and PHP versions are supported by decimal-input?
- The available release context does not declare PHP or illuminate/* constraints, a test matrix, or a CI badge. Before adopting it, inspect composer.json and the repository CI configuration to confirm compatibility with your Laravel version. Treat Laravel 9, 10, and 11 support as unverified until you confirm it for 0.0.1.
- Does decimal-input validate numeric input or only render a Blade input?
- The stated scope is a Blade component for decimal and money input presentation. The available context does not confirm whether the package also exposes a validation rule, a cast, or request-normalisation helper. If it only handles Blade rendering, add server-side validation and normalisation for API and console input paths.
- How does decimal-input handle comma versus dot decimal separators?
- The package is described as handling locale-aware separators and formatting for decimal and money inputs. The exact parsing rules for ambiguous values such as 1,234 or 1.234 are not documented in the provided context. Test these cases explicitly for your target locale before using it with financial data.
- Can I use decimal-input for currency and monetary values?
- It is positioned for decimal and money inputs, but the context does not state how values are represented internally or how rounding is handled. Confirm that it preserves precision and does not coerce values through native floats before storing them in DECIMAL columns or integer minor units. Keep authoritative monetary arithmetic in your domain layer rather than coupling it to a Blade component.
- How should I test decimal-input before using it in production?
- Add tests for decimal separator handling, thousands separators, negative values, precision overflow, and invalid input. Check whether the package has its own test suite and what it covers, especially silent coercion or ambiguous input acceptance. Pin the exact 0.0.1 version and run your tests against the same Laravel and PHP versions you deploy.
- Is version 0.0.1 of decimal-input stable enough for production?
- Version 0.0.x carries no semantic-versioning stability guarantee, so breaking changes are possible on any minor bump. The package also appears to be single-maintainer with no published support policy or upgrade narrative. Pin exact versions and treat it as a replaceable convenience dependency rather than load-bearing infrastructure.
- What happens when decimal-input receives invalid or ambiguous input?
- The available context does not document whether invalid input throws an exception, returns null, or is silently coerced. Silent coercion is dangerous for money and inventory data because downstream columns may truncate or round without an error. Verify the behavior with tests and enforce validation at the request boundary.
- What are alternatives to using a package for Laravel decimal inputs?
- You can implement the same boundary with a small Blade component, request normalisation, a validation rule, and a custom cast where needed. Store authoritative values in DECIMAL columns or integer minor units and keep formatting separate from parsing. A focused in-house implementation may be preferable if the package lacks tests, compatibility declarations, or maintenance guarantees.