- Is wemersonrv/input-mask a Blade package for Laravel forms?
- No. Despite descriptions that mention Blade directives and helpers, the repository is a Laravel Nova custom field: one PHP Field subclass plus a Vue component that renders a masked input inside Nova's admin UI. It ships no Blade components, directives, Livewire support, or validation rules. If your target is a Blade or Livewire form, this package is not the right tool, so plan on a client-side JavaScript mask library instead.
- Does wemersonrv/input-mask work with Laravel Nova 4 or 5?
- No. The last release was 2019-05-16, which places it in the Nova 1.x/2.x and Vue 2 era, while Nova 4 and 5 ship a Vue 3 frontend. On a modern Nova install the component would need to be rewritten, so treat the source as a reference rather than a drop-in dependency. Confirm your Nova major version before committing to anything.
- How do I install wemersonrv/input-mask in a Laravel app?
- On a legacy Nova install it is a composer require, a field registration in your resource's fields() method, and an asset publish for the bundled JavaScript. There is no service provider wiring into controllers, jobs, or API layers, because all behavior lives in the frontend component. Watch for 2019-era Composer constraints and asset-pipeline assumptions that may not match your current build.
- What input formats does wemersonrv/input-mask support?
- It ships ready-to-use masks for CPF/CNPJ, phone numbers, dates, and currency, plus support for custom mask patterns defined per field. The mask metadata is passed from the PHP field to the Vue component, which applies formatting in the browser. Check the exact token syntax in the source, because the README and the code disagree about what the package actually does.
- Does the package validate CPF, CNPJ, or phone numbers?
- No. Input masks format keystrokes; they never validate. The field almost certainly submits the masked string verbatim, so any downstream rule, join, LIKE query, or export that assumes digits will be silently wrong. Pair the field with a FormRequest prepareForValidation() method or model mutator and add your own validation rules.
- What license does wemersonrv/input-mask use, and is GPL-3.0 a problem?
- It is GPL-3.0, which is a genuine outlier in the MIT-dominated Laravel ecosystem. Internal unmodified use is usually defensible, but distributed software, on-prem appliances, or client-delivered code can trigger copyleft obligations. Get legal sign-off as a release gate rather than treating it as a footnote.
- Is wemersonrv/input-mask still maintained?
- Effectively no. It has roughly 11 stars, zero dependents, and no release in six years, so there is no community to absorb future Nova upgrades and no security response path. The bundled JavaScript mask library underneath is also unexamined, including its version and CVE state. Treat it as frozen code that you own once you adopt it.
- How do I store digits only instead of the masked value?
- Normalize in a FormRequest prepareForValidation() method, a model mutator, or both, and decide which layer owns the tests. Use displayUsing() formatters on Nova index and detail views to re-apply the mask at render time so the stored value stays canonical. Also confirm the canonical stored form matches what already exists in your columns.
- How do I avoid vendor lock-in to this Nova field?
- Adopt it only on legacy Nova, and subclass the vendor field immediately so the vendor namespace appears exactly once, for example App\Nova\Fields\MaskedText with fluent helpers like ->phone() and ->document(). Every call site then references your own class, so swapping or porting later touches one file. This also gives you a natural place to add normalization and display formatting.
- What should I use instead for masked inputs in Laravel?
- For Nova 4 or 5, build a small custom field or port the two source files into your own nova-components package, using this repo as a reference. For Blade, Livewire, or Inertia forms, use a client-side mask library such as Alpine.js with a mask plugin, and keep normalization and validation server-side. Either way, masks are a presentation concern, so keep the stored value canonical.