[ticket/11615] Refactored isvalid test to be more imperative

Refactoring the continue/is_valid test to remove
the confusing data provider work around, while
still keeping redundancies down to a minimum.

PHPBB3-11615