[ticket/12097] Validate_data() should work with class method

https://tracker.phpbb.com/browse/PHPBB3-12097

PHPBB3-12097