@WIP: Add validation to csv import based on content type.

#6054 

WIP

Validation of uploaded CSV file is performed according to the content type.
Let's keep it for now. I think we can keep this so @rbran100 could merge this and @tcheng001 can test the feature.