spring-projects/spring-framework — pull request #464 by bijukunjummen (2014-02-15 04:17:13+00:00)
Title: SPR-11429 - Proposed change in behavior of Databinder.addValidators to not throw an exception on unsupported validators

https://jira.springsource.org/browse/SPR-11429

When custom validators are added to Databinder, databinder tends to throw an exception if the validator is not relevant to the class being bound.

The changes in this commit proposes to change this behavior by instead registering the validator if it is relevant to the class being bound, otherwise not registering it and this way not propagating up an exception.

The behavior change will help with use of custom validators in @InitBinder methods of Controllers much more intuitive(sample controller test included in commit)