2 Replies Latest reply on Feb 15, 2007 8:52 PM by kukeltje

    Custom Validator comparing two fields

    kukeltje

      Hi,

      I'm writing a set of custom hibernate validators for some date checking (minimal age, between ages, comparing two dates etc..) Validations on a single field work perfectly, as do validations between fields if I put them on the class level (TYPE). The latter only go off if (at least it seams that way) all other validations on the fields are done, so only if all required fields are filled. This is not the behaviour our customer (internally) wants. They want validation of these fields in an earlier stage.

      My problem is that from the field that is validated (e.g. a date of damage) I cannot get to the higher level dossier (en entitybean) to get to the date of reporting the damage. The latter should be after the former. Does anybody have a clue/hint here?

      Ronald