numeric() function casts represents number with comma and not with dot

I don't know why but the numeric function casts somehow the dot notation to comma representation. Maybe someone knows why that is?
TextInput::make('armortizing_interest_rate')
->placeholder('e.g. 3')
->numeric()
->default(0)
->suffix('%')
->minValue(0)
->maxValue(100)
->nullable()
->columnSpan(['default' => 2, 'sm' => 1]),
TextInput::make('armortizing_interest_rate')
->placeholder('e.g. 3')
->numeric()
->default(0)
->suffix('%')
->minValue(0)
->maxValue(100)
->nullable()
->columnSpan(['default' => 2, 'sm' => 1]),
If I remove the numeric validation the number shows with a dot.
4 Replies
Zoltes
Zoltes3mo ago
It probably has something with LOCALE. Check the .env file
TheNastyPasty
TheNastyPasty3mo ago
In my .env
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
Zoltes
Zoltes3mo ago
GitHub
Trying to display Price with ',' decimal Seperation · filamentphp f...
Hello, I am trying to pass the price using the TextInput->mask method with the Repeater Component via a HasMany Relationship. Everything works fine when saving, but when I open the edit mask, th...
TheNastyPasty
TheNastyPasty3mo ago
Thanks for your answer, but its hard for me to figure out whats the solution to my problem ? 🙂 Somehow this does not work for me
->mask(fn (TextInput\Mask $mask) => $mask
->patternBlocks([
'money' => fn (TextInput\Mask $mask) => $mask
->numeric()
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('€money')
)
->mask(fn (TextInput\Mask $mask) => $mask
->patternBlocks([
'money' => fn (TextInput\Mask $mask) => $mask
->numeric()
->thousandsSeparator('.')
->decimalSeparator(','),
])
->pattern('€money')
)
Want results from more Discord servers?
Add your server
More Posts
Combining preloaded options and search results in Forms\Components\SelectGood day, everyone! I would like to improve user experience with choosing a client from a list in a Current model in RepeatableEntryHow do I get the current model in a RepeatableEntry so I can use it in url()?how can i add requiresConfirmation when creating recordsi have trid this ```php protected function getCreateFormAction(): Action { return ActionUploading new image to a prefilled spatie media file upload not working in custom page with formsI have a custom page with forms. I have multiple file inputs. The file inputs successfully shows theSelect::selectablePlaceholder(false) not working with relationshipsI have the following select component, which correctly displays as a list of the user's leads, with Select HasMany relationship with CreateOptionAccording to the docs the ability to create a new option on the fly only supports `BelongsTo` and `BRelation Manager not in modalI need from a Relation Manager to be open not in a modal but in a new page, but that page should havHow to return the Wizard to step 1 after create success in custom page.Hello, I have created a custom page using the form following schema this form saves the data into exHaving issues with spa() and https and logoutWhen put URL::forceScheme('https') in boot() in AppServiceProvider, my panel spa() does not work. BuDynamic Form ValidationsHi, We stored different validations in database. How can we dynamically apply Filament field validat