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 8247193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:45:41+00:00 2026-06-07T22:45:41+00:00

I am working in a grails application, I have many domains in the applications,

  • 0

I am working in a grails application, I have many domains in the applications, more than 50! The error message generated are default, I have the following in my message.properties file

default.blank.message=Field "{0}" cannot be blank.

An example of my one of the domain class is as follows:

class Person {

    String firstName;
    String lastName;
    String middleName;
    Date dob;
    String gender;
    String religion;
    String nationality;
    String maritalStatus;

    Zone permAddZone;
    District permAddDistrict;
    String permAddVDC;
}

And so on, so when I leave a field, for example ‘maritalStatus’ the following error message shows up, ‘Field “maritialStatus” cannot be blank.’. I also added the following to my message.properties file

person.maritialStatus=Maritial Status

But still I am getting the ‘Field “maritialStatus” cannot be blank.’ message. I also tried using I18n Templates Plugin, but as I have a lot of domain classes, modifying error message for all of them would be time consuming. So, what choices do I have or what am I doing wrong. Any help is appreciated.

  • 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-07T22:45:43+00:00Added an answer on June 7, 2026 at 10:45 pm

    In order to override the field label you need to override the key:

    <package>.<domainclass>.<fieldname>.label
    

    So in your case, try:

    <package>.Person.martialStatus.label=Label
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Grails application that would handle video games But more than
I’m working on a grails web application with spring security. I have a requirement
I am working with a Grails web application and I get so many strange
I'm working on a Linux/Apache/MySQL/Grails application and have the choice of build tools. I'm
Using Grails 2.0.1 (upgraded from 1.3.7). In application.properties I have app.context = / and
I have been working on the project where application is using grails 1.2.2.... Now
I am working on a Grails based application. I have configured my application to
We have an application in Grails 2.0 that we have working when we run
I'm working on a Grails application. There is a domain class participant - within
I am working on my first Grails application, which involves porting over an old

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.