diff --git a/config/filament-money-field.php b/config/filament-money-field.php index ac74b37..e60ce0a 100644 --- a/config/filament-money-field.php +++ b/config/filament-money-field.php @@ -59,7 +59,7 @@ | Currency symbol placement |--------------------------------------------------------------------------- | - | Where the dunit should be on form fields. Options are 'before' (prefix), 'after' (suffix) or 'none'. + | Where the dunit should be on form fields. Options are 'before' (prefix), 'after' (suffix) or 'hidden'. | Note: In most non-English speaking European countries, | the currency symbol is after the amount and is preceded by a space (as in "10 €") | diff --git a/src/Forms/Components/MoneyInput.php b/src/Forms/Components/MoneyInput.php index 697fdcf..3670402 100644 --- a/src/Forms/Components/MoneyInput.php +++ b/src/Forms/Components/MoneyInput.php @@ -62,7 +62,7 @@ protected function prepare(): void match ($symbolPlacement) { 'before' => $this->prefix($getCurrencySymbol), 'after' => $this->suffix($getCurrencySymbol), - 'none' => null, + 'hidden' => null, }; if (config('filament-money-field.use_input_mask')) { @@ -92,8 +92,8 @@ public function symbolPlacement(string|Closure|null $symbolPlacement = null): st { $this->symbolPlacement = $this->evaluate($symbolPlacement); - if (! in_array($this->symbolPlacement, ['before', 'after', 'none'])) { - throw new \InvalidArgumentException('Symbol placement must be either "before", "after" or "none".'); + if (! in_array($this->symbolPlacement, ['before', 'after', 'hidden'])) { + throw new \InvalidArgumentException('Symbol placement must be either "before", "after" or "hidden".'); } return $this;