diff --git a/src/Schema/Ui/Slug.php b/src/Schema/Ui/Slug.php index 9d52134..0522a0f 100644 --- a/src/Schema/Ui/Slug.php +++ b/src/Schema/Ui/Slug.php @@ -32,7 +32,7 @@ class Slug implements FieldInterface, RequiredInterface public function format(array $input, array $output): array { - $value = $input[$this->name] ?? null; + $value = (string)$input[$this->name] ?? null; if(empty($value)){ $value = Str::slug($input[$this->source]); } diff --git a/src/Schema/Ui/Text.php b/src/Schema/Ui/Text.php index 414a94f..9043fb1 100644 --- a/src/Schema/Ui/Text.php +++ b/src/Schema/Ui/Text.php @@ -34,7 +34,7 @@ class Text implements FieldInterface, RequiredInterface public function format(array $input, array $output): array { - $value = $input[$this->name] ?? null; + $value = (string)$input[$this->name] ?? null; $output[$this->name] = (new Nullable($this->nullable, $value, ""))->value(); return $output; } diff --git a/src/Schema/Ui/Textarea.php b/src/Schema/Ui/Textarea.php index f012f62..83de185 100644 --- a/src/Schema/Ui/Textarea.php +++ b/src/Schema/Ui/Textarea.php @@ -31,7 +31,7 @@ class Textarea implements FieldInterface, RequiredInterface public function format(array $input, array $output): array { - $value = $input[$this->name] ?? null; + $value = (string)$input[$this->name] ?? null; $output[$this->name] = (new Nullable($this->nullable, $value, ""))->value(); return $output; }