Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7757735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:10:15+00:00 2026-06-01T13:10:15+00:00

I am using spring 3.0.2 for developing a simple web based application like twitter.

  • 0

I am using spring 3.0.2 for developing a simple web based application like twitter. My server side validations are going good with JSR validation API, but i can’t find any ways to internationalized messages in JSR validation API upon failed validation.

I am using following annotation on my model class Spitter.java representing a user in application.

public class Spitter implements Serializable{

private Long id;


@Size(min=8, max=15, message="some msg..")
@Pattern(regexp="^[a-zA-Z0-9]+$", message="some msg..")
private String username;

@Size(min=8, max=15, message="some msg..")
private String password;

@Size(min=3, max=15, message="some msg..")
private String name;

@Pattern(regexp="^$",message="some msg..")
private String email;

@NotNull(message="some msg..")
@NumberFormat(style= NumberFormat.Style.NUMBER)
@Min(value=14, message="some msg..")
@Max(value=99, message="some msg..")
private Integer age;

//getter setter not shown

}

I have checked JSR Validation API for localization support upon failed validations, but unable to find the same.

Is there any way i can acheive internationalization.

Thanks in advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:10:16+00:00Added an answer on June 1, 2026 at 1:10 pm

    You can put a ValidationMessages.properties file in your classpath with the approrpriately customized messages. You an either override the current set of messages, say for eg:

    javax.validation.constraints.NotNull.message=may not be null
    

    or if you want to use your own custom message:

       @NotNull(message="{custom.message}")
    

    an entry for which should be present in the ValidationMessages.properties file.

    This information is present in section 4.3.1.1. of JSR 303 specs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are developing a web application using Spring framework and Hibernate ORM. As far
I'm developing a simple, training application with Spring MVC and Hibernate. I'm using Maven
I am developing a Java Web Application using JSF, Spring and Hibernate. I need
I'm developing a spring based web application that is deployed on Google app Engine.
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
Hey I am developing an desktop application using Spring and Hibernate, and I have
I am using Spring Forms for my web application. For nested properties, the form
Im developing a simple console application using java. I want to display currently running
Im developing a simple console Application using java. The code is given below `
I've been developing a simple Spring MVC application as a reporting service. Locally, I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.