Using Related Field Data in Validation Messages

Can anyone tell me how to pass related data into the Validation message? Currently, this works as I want it to; I just need a better error message.
Select::make('entity_type_id')
    ->label('Entity Type')
    ->relationship('entityType', 'name')
    ->required(),
TextInput::make('name')
    ->required()
    ->unique('entities', 'name')
    ->validationMessages([
        'unique' => 'This {{I want to display entityType.name here}} already has an attribute with this name.',
    ])
    ->maxLength(255),
Was this page helpful?