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

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -