Key-value Field with dot in key

Maybe I am blind/stupid, but why isn't it possible to save a key value in a KeyValuefield with a dot in the name? I have just this simple field:

public static function form(Form $form): Form
{
    return $form
        ->schema([
            KeyValue::make('data'),
        ]);
}

and of course I cast it in the model to array:

protected function casts(): array
{
    return [
        'data' => 'array',
    ];
}


So keys like "Test" or "Test 2asdas" or "Test 3!" are working and I can save them without errors.

But as soon as there is a dot inside like "Test." or "Test Value. XY" then I get: "No synthesizer found for key: "1""

Context: I use this field to create a mapping of values to IDs. For example, I want to map certain brand names like "Apple" or "Google" to IDs. However, my source dataset also contains brands with a "." in their name, such as "O.B.":

{
     "Apple": 1,
     "Google": 2,
     "O.B.": 3
}
image.png
Was this page helpful?