I'm building an interface to create multiple records in the db, using Codeigniter.
The input is text copied and pasted from an Excel file, with the fields names in the top row.
Parsing that text and converting it into an array is easy enough. But I try to think what would be the best way to validate the data before inserting it into the database (make sure all the not-null fields are filled, all the integer fields are numeric, all the foreign keys are valid, etc.).
I'm looking for something similar to the form validation rules in CI. Any pointers as to where I should start looking?