Stripes

Extend @Validate annotation to accept optional key attribute for custom error messages

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4.1
  • Fix Version/s: None
  • Component/s: Validation
  • Labels:
    None

Description

How about to add a new attribute to the @Validate annotation named 'key' (or something similar).
The idea is to have the possibility to create other (localized) error messages than those provided by
the validation framework so far.

@Validate(on="calc",required=true,key="conversion.error.for.my.specific.value")
private Integer value;

The 'key' attribute is ment to be optional. Further checkings are not required i think, because there are very
rare situations when you need a custom error message on property validation during the binding stage.
So it's up to the developer to provide a proper formatted message string in the resource bundle.

Activity

There are no comments yet on this issue.

People

Vote (1)
Watch (0)

Dates

  • Created:
    06/Oct/06 10:18 AM
    Updated:
    19/Jan/08 2:47 PM