We are building a real-estate portal. We have Services, Mappers and Entites. At the stage we are allowing users to either

1. Create a property via a form.
2. Upload a batch file containing 1 or more properties.

So if he create a property via the form we can validate the form and if its a valid property, we can add it into our system. But if he upload via a batch file, we think that the responsibility of the form is 

* to validate that the user provided a file
* the file type is valid
* and the file size is within the allowed limits.

After this it should hand over the file to the controller or service.

Now the pending tasks are

* Process the file and retrieve the contents
* Validate the contents
* If validated, save the properties or display an error.

So which part(s) are responsible for the above tasks?

I am thinking that the controller should do the initial file processing and pass the data to the service. This means that we will create/fetch the form object in the controller and validate the form within the controller.

Now the next section is to validate the contents, which is actually a collection of entities. So we have following ideas for this stage

1. Service will validate the data and create the entities, it will save them.
2. Or service will create the entity with the provided data and then call the validation function of the entity.
3. Or the service will try to create an entity with the provided data (send the data to the entity constructor), and if the data is valid, the entity will be created or will generate an error etc.

The possible issues I can think about above approaches are

* If the service is validating the data, it means the service will know the inner structure of the entity, so if down the road we need to update the entity structure, we have to update the service as well. Which will introduce some sort of dependency.
* In the 2nd approach, I don't think that an entity should be created at first place if it isn't valid.
* In the 3rd approach, we are creating a functionality within entity's constructor, so making the entity dependent on the data. So when we need to fetch the entity from persistent, we need to provide some stub data.

Or am I over-thinking??