As you can see I'm using both built-int and custom rules (callback_type_check).

This works fine with my 'Add Item' form.

However, I wanted to reuse the validation logic at other place, where the user can provide multiple items to add at once in a file where each row represents a single item. So I read line by line from the file and want to validate each line. To do that I reset values in $_POST array and perform validation:

The function simply remembers the rules that were loaded from config file when validation object was created, creates a new validation object and resets the rules. I call it after each row is validated.