processing foreign key validation inside view