Announcement Announcement Module
No announcement yet.
Editor / validator message problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Editor / validator message problem

    Hi everybody,
    i have the following problem:

    I wanna validate a date depending on a choosable locale. If no date is entered, a single message should appear.
    If a wrong date is entered, another single message should appear.
    I wrote a custom date editor (because its the only possibility to validate depending on some variable, right?), registered it via registrar,
    and additionally defined a 'required' rule for the field in 'validator.xml'.

    In general it works, BUT:
    If the date editor receives an invalid date string regarding the chosen locale, it has to throw an IllegalArgumentException to report this,
    and cannot set the date property of the command object.
    That results in an second message, because AFTER the editor the 'required' validator is called and of course finds no value.
    So i get two messages: 'Invalid date value' and 'Value required'.
    May i change this behaviour or is this by design? Hmmm, i feel i miss something very obvious...

    Thanks a lot, best regards