A Laravel Nova field that automatically adds thousand separator dots while typing (e.g., 1000 becomes 1.000)
galangaidilakbar/numeric-mask is a Laravel package for a laravel nova field that automatically adds thousand separator dots while typing (e.g., 1000 becomes 1.000).
It currently has 0 GitHub stars and 150 downloads on Packagist (latest version v1.0.0).
Install it with composer require galangaidilakbar/numeric-mask.
Discover more Laravel packages by galangaidilakbar
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel Nova field that automatically adds thousand separator dots while typing. Perfect for currency, quantities, or any numeric input that needs better readability.

You can install the package via composer:
composer require galangaidilakbar/numeric-mask
use Galangaidilakbar\NumericMask\NumericMask;
public function fields(Request $request)
{
return [
NumericMask::make('Price'),
];
}
That will give you separate dots while typing in the input field.
Since we store the raw value in the database, you can do whatever you want with the value. For example, you can use the currency method from Laravel's Number class:
use Illuminate\Support\Number;
use Galangaidilakbar\NumericMask\NumericMask;
public function fields(Request $request)
{
return [
NumericMask::make("Price")->displayUsing(
fn($value) => Number::currency($value)
),
];
}
That will display the value as a currency to be something like this: $20,000.00.

The MIT License (MIT). Please see License File for more information.