Improve validateSteps filter