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
Zoltes•7mo ago
It probably has something with LOCALE. Check the .env file
TheNastyPasty
TheNastyPastyOP•7mo 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
Zoltes•7mo 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
TheNastyPastyOP•7mo 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