I understand, and yes it makes sense. Validation, and the order in which it
should be invoked, is a complex theme, and we have been struggling with it
for a while too.

We make a distinction between syntactic and semantic (business) validation:
syntactic validation should happen before conversion, to prevent impossible
conversions (f.i. a syntax error in a date string). But semantic validation
should happen after conversion, as it is supposed to work on the converted
type (f.i. is a data out of range). Now, we consider all Hibernate
validation annotations as semantic validation: they are defined on the
entity. In the case of the @NotEmpty validation, you can perfectly represent
absence of value by a null (using the object wrappers for native types), so
the converter should not have any problems with that.

Does that make sense ?

Jan.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-latest-changes-in-FormComponent%3Avalidate%28%29-tf3945885.html#a11208700
Sent from the Wicket - Dev mailing list archive at Nabble.com.

Reply via email to