当我尝试在Symfony 1.4中保存表单时,它给了我这些错误:
Validation failed in class CmsContentElementFile
4 fields had validation errors:
* 1 validator failed on title (unsigned)
* 1 validator failed on alt (unsigned)
* 1 validator failed on link (unsigned)
* 2 validators failed on direction (length, unsigned)
这个错误是什么意思?
编辑:
表单字段中的验证者:
$this->setValidators(array(
'title' => new sfValidatorString(),
'alt' => new sfValidatorString(),
'link' => new sfValidatorString(),
'width' => new sfValidatorInteger(),
'height' => new sfValidatorInteger(),
'direction' => new sfValidatorPass()
));
答案 0 :(得分:0)
现在有效。问题在于我给了田地"方向" param" unsigned:1,它也是一个varchar。好吧,解决问题。希望它对某人有所帮助。