I am using the annotation validation as below:
public String processRegistration(@Valid Spitter spitter, Errors errors,
Model model) {
Judging from your explanation and the following error java.lang.ClassNotFoundException: javax.validation.Validator Spring doesn't see the classes and as such doesn't enable JSF-303 validation.
Make sure that the correct jars are on the classpath and that you have an implementation as well. When using maven adding something like the following should do the trick.
javax.validation
validation-api
1.1.0.Final
org.hibernate
hibernate-validator
5.1.3.Final
This will add the needed jars to the WEB-INF/lib directory which in turn lets Spring Web MVC detect it and configure the appropriate bean.
For an explanations of the different annotations you might want to check In Hibernate Validator 4.1+, what is the difference between @NotNull, @NotEmpty, and @NotBlank?.