welkervinicius/nova-jquery-mask
A Laravel Nova field that integrates jQuery Mask into your forms, letting you apply input masks for phone numbers, dates, currency, CPF/CNPJ, and other formatted values with simple field configuration.
Package scope. welkervinicius/nova-jquery-mask is a Laravel Nova field package — a thin Vue component that wraps the jQuery Mask plugin and mounts it onto a Nova form input. It does not touch application domain code, routing, persistence, or auth. That keeps the architectural blast radius small and the package easy to reason about.
Architecture fit. Good, with one caveat. It conforms to Nova's documented extension model (a Field subclass plus a compiled JS/CSS component asset), so it slots in wherever Nova already is. The caveat is the jQuery dependency: Nova 4 ships Vue 2 and tolerates jQuery-based field components, while Nova 5's front-end modernization makes third-party jQuery plugins a higher-risk integration. v1.0.0 is the project's first stable release, and the changelog supplied is only a compare link — there is no published compatibility matrix, no upgrade notes from a pre-1.0 line, and no stated Nova major-version support. Treat version support as unverified until confirmed.
Integration feasibility. Low effort in the happy path: composer require, add the field to a Nova resource, pass a mask string. Value is realized immediately and is reversible by removing the field definition. The real work is not installation but validation parity — masks are presentation-layer only, so every masked field needs a matching server-side rule (regex, digits, size) or malformed input will pass through when JS fails or is bypassed.
Technical risk (ranked).
| Risk | Likelihood | Impact | Note |
|---|---|---|---|
| Nova major-version incompatibility on upgrade | Medium | Medium | jQuery-era field component; no declared support range |
| Client-side-only masking mistaken for validation | Medium | High | Data-integrity risk, not a package defect |
| Single-maintainer abandonment | Medium | Low–Medium | Mitigation: package is small and forkable |
| jQuery Mask plugin upstream staleness/CVE | Low | Low | Client-side only, but affects CSP audit |
| Bundled asset conflicts with other Nova field JS | Low | Low | jQuery global scoping |
Key questions to resolve before adoption.
Stack fit. Best fit is a Laravel + Nova application on Nova 4, where jQuery-based field components are conventional. On Nova 5, do not assume fit — verify against a scratch Nova install first. Applications without Nova gain nothing from this package.
Migration path. There is no migration: the package is additive. For a pre-existing resource, adoption means changing a field's class from Text to the package's field and adding a mask option, then adding the corresponding server-side validation rule in the same FormRequest. Roll back by reverting the field class — no data migration, no schema change.
Compatibility checks, in order.
composer why-not / composer require --dry-run against our locked Nova version.dependsOn, readonly, disabled) — masked inputs frequently double-apply or fail to re-init when a field is toggled.Sequencing. Ship in four steps, each independently observable: (a) spike the field on one low-traffic resource behind a feature branch; (b) pair every masked field with a server-side validation rule and add a test asserting rejection of unmasked input; (c) roll to all resources in one vertical slice; (d) record the supported Nova version in our dependency policy so the next Nova upgrade triggers a re-check. Do not bundle this into a larger Nova upgrade — it becomes impossible to attribute failures.
Maintenance. Low ongoing cost: the package is small, its surface area is a single field type, and the release cadence appears minimal. The offsetting concern is bus factor — a single maintainer with a sparse release history means we should assume we may need to fork. Budget a half-day to confirm the codebase is small enough to own if abandoned; if it is not, that changes the calculus.
Support. No vendor support path. Support burden lands on the adopting team, and the failure signals are front-end (JS console, asset compile) rather than PHP exceptions, which routes incidents to whoever owns the Nova UI rather than backend on-call. Document that in the runbook.
Scaling. Negligible server-side impact — no queries, no middleware, no request lifecycle hooks. The only scaling dimension is client asset weight: an added JS bundle plus the jQuery Mask plugin on every Nova page load. Immaterial for internal admin panels; worth an eyeball if Nova is exposed to many concurrent operators or over constrained networks.
Failure modes.
Ramp-up. For a developer already fluent in Nova custom fields, hours; for the team, the durable cost is not learning the package but establishing the masking-plus-validation convention so masks are never treated as a substitute for server-side checks. Adopt with that convention written down, verify Nova 5 support before any upgrade, and keep the fork option open.
How can I help you explore Laravel packages today?