# Validation API Platform Core uses the [Symfony Validator component](http://symfony.com/doc/current/book/validation.html) to validate entities. Without specific configuration, it uses the default validation group, but this behavior is customizable. ## Using Validation Groups Built-in actions are able to leverage Symfony's [validation groups](http://symfony.com/doc/current/book/validation.html#validation-groups). You can customize them by editing the resource configuration and add the groups you want to use when the validation occurs: ```php authorizationChecker = $authorizationChecker; } public function __invoke(Book $book): array { return $this->authorizationChecker->isGranted('ROLE_ADMIN', $book) ? ['a', 'b'] : ['a']; } } ``` This class selects the groups to apply regarding the role of the current user: if the current user has the `ROLE_ADMIN` role, groups `a` and `b` are returned. In other cases, just `a` is returned. This class is automatically registered as a service thanks to [the autowiring feature of the Symfony Dependency Injection Component](https://symfony.com/doc/current/service_container/autowiring.html). Just note that this service must be public. Then, configure the entity class to use this service to retrieve validation groups: ```php