Symfony还有什么可以做的安全措施?

I would like save data from user without forms, for example:

$car = new Car();
$car->setName($request->get('name'));
$car->setPrice($request->get('price'));

$em->persist($car);
$em->flush();

And next use this data and display it to other users.

So... Should I use additional PHP functions for security on save data? htmlspecialchars(), stripslashes() etc?

I know Symfony has security, but what?

I know I should validate the data, but bypassing validation what else?

You can make rules in your Car model:

Or you can make it like this

Validator::make($request, [
'name' => [
    'required'
],
]);