Is it possible to validate all the fields of an uploaded CSV file and will display all errors if any of the validations fail using PHP
For example I have a CSV file uploaded by a user which contains these:
Name,Job,Age
John,Clerk,23
Debra,Manager,32
1A3ce,,40a
Validations will be:
If Name contains numeric value, display error to the user
If Age contains non-numeric value, display error to the user
If Age is equal or less than zero, display error to the user
If Job exceeded 15 characters in length, display error to the user
If any of the fields does not have a value or it is blank, display error to the user
How do you do this? I have little knowledge in PHP and at least a guide on how to code this will help me greatly.
What I have tried:
I don't really know how to start coding this.. I really need help.