์ปจํธ๋กค๋ฌ ์ฝ๋:
```
/**
* ์ด๋ฉ์ผ/๋น๋ฐ๋ฒํธ๋ฅผ ํตํด ์์คํ
์ ๋ก๊ทธ์ธํ๊ณ ๋ณด์ ํ ํฐ์ ๋ฐ์ต๋๋ค.
* @Rest\View()
* @Route("/user/login.{_format}",defaults={"_format": "json"})
* @๋ฉ์๋("ํฌ์คํธ")
*
* @RequestParam(name="apikey", ์๊ตฌ ์ฌํญ="[a-zA-Z0-9]{32}", allowBlank=false, strict=true, description="์์ฉ ํ๋ก๊ทธ๋จ API ํค")
* @RequestParam(name="email", requirements=".+@.+..+", allowBlank=false, strict=true, description="์ฌ์ฉ์์ ์ด๋ฉ์ผ ์ฃผ์")
* @RequestParam(name="password", requirements=".{4,30}", allowBlank=false, strict=true, description="์ฌ์ฉ์ ๋น๋ฐ๋ฒํธ")
* @param ParamFetcher $paramFetcher
* @param ์์ฒญ $request
* @param LoggerInterface $logger
* @return ์๋ต
* ์์ฉ ํ๋ก๊ทธ๋จ ์คํจ ์ @throws HttpException
*/
๊ณต๊ฐ ํจ์ postLoginAction(ParamFetcher $paramFetcher, ์์ฒญ $request, LoggerInterface $logger)
{
Upon sending an API request, this results in an error like:
[2018-01-11 16:13:57] php.CRITICAL: 'Symfony\Component\Validator\Constraints\NotNull' ํด๋์ค๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค. {"์์ธ":"[๊ฐ์ฒด] (Symfony\Component\Debug\Exception\FatalThrowableError( ์ฝ๋: 0): 'Symfony\Component\Validator\Constraints\NotNull' ํด๋์ค๊ฐ /home/eross/myp/vendor/friendsofsymfony/rest-bundle/Controller/Annotations/AbstractParam.php:75)์์ ์ฐพ์ ์ ์์ต๋๋ค."} []
[2018-01-11 16:13:57] request.CRITICAL: ์กํ์ง ์์ PHP ์์ธ Symfony\Component\Debug\Exception\ClassNotFoundException: ""Symfony\Component\Validator\Constraints" ๋ค์์คํ์ด์ค์์ "NotNull" ํด๋์ค๋ฅผ ๋ก๋ํ๋ ค๊ณ ํ์ต๋๋ค. ๋ค๋ฅธ ์ด๋ฆ ๊ณต๊ฐ์ ๋ํ "use" ๋ฌธ์ ์์ผ์
จ์ต๋๊น?" /home/eross/myp/vendor/friendsofsymfony/rest-bundle/Controller/Annotations/AbstractParam.php ์ค 75 {"์์ธ":"[๊ฐ์ฒด] (Symfony\Component\Debug\Exception\ClassNotFoundException(์ฝ๋: 0): \"Symfony\Component\Validator\Constraints\" ๋ค์์คํ์ด์ค์์ \"NotNull\" ํด๋์ค๋ฅผ ๋ก๋ํ๋ ค๊ณ ํ์ต๋๋ค.\n/home/eross/myp/vendor/friendsofsymfony/์์ ๋ค๋ฅธ ๋ค์์คํ์ด์ค์ ๋ํ \"use\" ๋ฌธ์ ์์ด๋ฒ๋ ธ์ต๋๊น? ๋๋จธ์ง ๋ฒ๋ค/์ปจํธ๋กค๋ฌ/์ฃผ์/AbstractParam.php:75)"} []
```
Validator ๊ตฌ์ฑ ์์๋ฅผ ์ค์นํ์ต๋๊น?
์, ๊ฐ์ฌํฉ๋๋ค. ์, ๊ทธ๊ฒ ์ ๊ฐ ํ์ํ ์ ๋ถ์์ต๋๋ค.
composer require symfony/validator
์ด๋ป๊ฒ๋ ์ ์ํด์ผ ํ์ง ์์๊น์?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
Validator ๊ตฌ์ฑ ์์๋ฅผ ์ค์นํ์ต๋๊น?