• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"null is requred" validation message

 
Mark Beavis
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone -

I'm a beginner in Struts and am just trying to introduce validation onto my form for the first time. The good news is that the form is validating, however a sensible error message is not being returned.

My form bean property:


My validation rule:


I'm using the struts blank project that comes with the struts 1.3.5 download and I haven't changed anything apart from the above.

Can anyone help out - Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must add a message key to your MessageResources.properties file that matches the key you specified. Example:

Once you change this, redeploy, and restart the server, the message should read "Type is required".
 
Mark Beavis
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Merrill!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic