java - Spring validation annotation using message with parameters -
i'm trying use annotations custom message in spring/hibernate validation. want support internationalization while being able pass in parameter.
for instance, here field in java class:
@notempty (message = "{error.required}") public string name;
validationmessages.properties has this:
error.required = {0} required field
so i'm looking way pass in field name message using message annotation in java class. possible?
edit: similar question: jsr 303 bean validation in spring
Comments
Post a Comment