Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed
Description
It should be documented with the "empty_data" option that the data must be passed in view format, in case that differs from model format. For IntegerType, for example, "empty_data" must be set to a string value, not an integer (conversely to what you would intuitively expect):
$builder->add('number', IntegerType::class, ['empty_data' =>'0',// not: 0]);