if (array_key_exists('required', $def) && empty($value) && $value !== '0' && $value !== 0) {
return civicrm_api3_create_error(ts("This can't be empty, please provide a value"), array("error_code" => "required", "field" => $field));
}
switch ($def['type']) {
if (array_key_exists('required', $def) && empty($value) && $value !== '0' && $value !== 0) {
return civicrm_api3_create_error(ts("This can't be empty, please provide a value"), array("error_code" => "required", "field" => $field));
}
switch ($def['type']) {