[ticket/11840] Create method for validating individual elements

PHPBB3-11840