2

当我尝试在 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()
          ));
4

1 回答 1

0

现在可以了。问题是我给字段“方向”提供了参数“unsigned:1”,它也是一个 varchar。那可以解决问题。希望它对某人有所帮助。

于 2013-04-05T11:30:37.420 回答