I have a working form, it has a required field, which should be notBlank:
private $field1 = '';
If I specify this field in the request, but leave the field empty, I get this answer:
{ "code":400, "message":"Validation Failed", "errors":{ "children":{ "field1":{ "errors":["Field should not be blank"] } } } }
If I omitted this field from the request, I get this response:
{ "code":400, "message":"Validation Failed", "errors":{ "errors":["Field should not be blank"] } }
Is there some kind of built-in Symfony logic that I can use so that the second example matches the first example?
[edit] Used Symfony 2.5 - now upgraded to Symfony 2.8.3, same problem.
source share