fixed validator for symfony 2.3

fixed validation methods for symfony 2.3