I'm using Feeds import module, after importing CSV file, if a row doesn't match content type validation the feeds import saves that node with empty space in that field.
Question: Now i want FeedsNodeProcessor to validate the node, and if there is a empty space it should throw error for that node or should not create node for that row.
Example: If i have 40 rows in an excel and 39 rows satisfies the conditions of content type and only 1 row doesn't then it has to like this, 39 nodes created.
Updated: i have added hook_feeds_prevalidate() in my hook_form_alter module.
function tracker_custom_form_alter(&$form, &$form_state, $form_id) {
if($form_id == 'orientation_node_form'){
$form['#validate'][] = 'validate_orientation';
}
}
function validate_orientation($form,&$form_state)
{
....
}
function tracker_custom_feeds_prevalidate($source, &$entity, &$item, $entity_id) {
// dpm($entity->feeds_item->id); - its not printing anything.
// dpm($item); - its not printing anything.
if ($entity->feeds_item->id == 'bulk_upload') {
if (empty($item['Billing Type'])) {
$entity->feeds_item->skip = TRUE;
drupal_set_message('ksdhbf');
}
}
}