fixed validator for symfony 2.3