im testing symfony form validation.
the problem is very simple.
no matter what i put in the body text area and post it, i keep getting "Required" back.
i dont know why.
i just have one validation rule.
here is the code: code
what is wrong/how can i debug?
thanks
UPDATE: it has something to do with the binding in the controller.
cause even if i delete the validation the form will still not be valid and it will be passed to the template but this time without the "Required".
so it wont be valid no matter if ive got the validation or not.
it has something to do with the embedForm() maybe? someone that has validated an embeded form?
i have printed the error messages out with
<?
foreach ($form->getErrorSchema() as $field => $error) {
printf("%s: %s\n", $field, $error->getMessage());
echo "<br />";
}
?>
and i get:
0: Unexpected extra form field named "body".
thread: body [Required.]
_csrf_token: Required.
Body
do they mean that thread:body is required or csrf is required?
thanks