我有以下注释方法:
class ProjectController extends FOSRestController
{
/////
* @QueryParam(name="status", strict=true, requirements="[a-z]+", description="status of project", nullable=true)
* @QueryParam(name="skill", strict=true, requirements="^[a-zA-Z ^0-9().,+]+", description="skill of project", nullable=true)
* @QueryParam(name="close", requirements="\d+", description="project by close")
* @QueryParam(name="main_skill", strict=true, requirements="^[a-zA-Z ^0-9().,+]+", description="project by main_skill", nullable=true)
但是如果我有skill
或main_skill
C ++并且在调试中我看到query->main_skill="C "
或者如果我在调试中需要C#我只有" C",需要什么添加要求?
答案 0 :(得分:0)
for C ++试试这个:requirements =“^ [a-zA-Z ^ 0-9()。,\ +] +”