This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bizarro date validation issue

 
Tony Smith
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added some validation rules for dates.
When I run my app, the invalid dates seem to be caught properly, but no text displays. Instead, I just get a blank line at the top of the display where I'd expect to see error text. If I have 3 dates, and they are all invalid, I get 3 blank lines. If I fix a date, one of the blank lines disappears.

I have several other validations - masks, integers, etc, and they work fine. However, all my date validations exhibit the odd behavior.

Ideas?

Thanks,
Tony

-=-=-=-=-

I put this at the top of my jsp:




Here is an example from validation.xml, which I think is standard:



I have defined the error text. A snippet from the file is

 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Tony InKY",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
 
Tony Smith
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There ya go, all better now!
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
View the html source of the "blank lines" and let us know what you find.

At the very least it should be <br> or <li> tags.
 
Tony Smith
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are <BR>s

Here's a snippet.



[ March 15, 2005: Message edited by: Tony Smith ]
[ March 15, 2005: Message edited by: Tony Smith ]
 
Tony Smith
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, problem solved.

I'm using this type of validation for the first time, and on an application I inherited. Much to my horror, the output text for the standard rules in validation-rules.xml are in application.properties. Somehow, they got hosed up. The date validation definition was entirely missing and this is why an empty line was produced. The maxlength text was there but was using arguments 0 and 2 for some reason.

Blah.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic