[BUGFIX] Check if validationrules are set before foreach statement