1
我有以下錯誤,同時通過進口學說一些數據:爲什麼我會在Symfony 1.4上使用Doctrine保存「驗證失敗」?
value1:19.022542
value2:497.795
value3:9466.541667
Caught exception: Validation failed in class DataPerDay
27 fields had validation errors:
* 1 validator failed on value1 (type)
* 1 validator failed on value2 (type)
* 1 validator failed on value3 (type)
我不明白這個驗證錯誤! 字段是的float類型,這裏可能會發生什麼?
的schema.yml:
DataPerDay:
connection: doctrine
tableName: xp_data_per_day
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
inverter_id:
type: integer(4)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
(...)
value1:
type: float
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
(...)
怪異的是,我對生產environnent的錯誤,而不是在localhost :(
編輯:在BaseDataPerDayFormFilter.class.php,該驗證程序是:
'value1' => new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))),
這是正確的?
清除緩存?您是否在某處設置了自定義驗證規則?你如何導入數據? – binarious 2012-04-24 09:30:57
我在/ lib/tasks;緩存不會被顛覆發送 – Manu 2012-04-24 09:36:54
如何導入數據? – binarious 2012-04-24 09:39:41