What does the @Valid annotation indicate in Spring?

It’s for validation purposes.

Validation It is common to validate a
model after binding user input to it.
Spring 3 provides support for
declarative validation with JSR-303.
This support is enabled automatically
if a JSR-303 provider, such as
Hibernate Validator, is present on
your classpath. When enabled, you can
trigger validation simply by
annotating a Controller method
parameter with the @Valid annotation:
After binding incoming POST
parameters, the AppointmentForm will
be validated; in this case, to verify
the date field value is not null and
occurs in the future.

Look here for more info:
http://blog.springsource.com/2009/11/17/spring-3-type-conversion-and-validation/

Leave a Comment