Issue #3167408 by pcambra: field_attach_validate not called for some farmOS entities
This commit is contained in:
parent
e093c5863b
commit
82874abdee
|
@ -176,6 +176,8 @@ function farm_asset_form(array $form, array &$form_state, FarmAsset $farm_asset)
|
|||
* The form state array.
|
||||
*/
|
||||
function farm_asset_form_validate(array $form, array &$form_state) {
|
||||
$farm_asset = (object) $form_state['values']['farm_asset'];
|
||||
field_attach_form_validate('farm_asset', $farm_asset, $form, $form_state);
|
||||
|
||||
// If the 'archived_boolean' checkbox has changed, update the asset.
|
||||
if ($form_state['values']['archived_boolean'] != $form['asset_status']['archived_boolean']['#default_value']) {
|
||||
|
|
|
@ -173,7 +173,8 @@ function farm_plan_form(array $form, array &$form_state, FarmPlan $farm_plan) {
|
|||
* The form state array.
|
||||
*/
|
||||
function farm_plan_form_validate(array $form, array &$form_state) {
|
||||
|
||||
$farm_plan = (object) $form_state['values']['farm_plan'];
|
||||
field_attach_form_validate('farm_plan', $farm_plan, $form, $form_state);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue