wood burning stoves
The moose likes Struts and the fly likes Struts Validation using Struts Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validation using Struts Framework" Watch "Struts Validation using Struts Framework" New topic

Struts Validation using Struts Framework

Vicky Mohan
Ranch Hand

Joined: Oct 14, 2004
Posts: 130
I just want to know if the following condition can be verified using STRUTS validation framework

I have a form with four fields. They are not REQUIRED, but as the User focusses on a field and navigates to the next field without entering any value, i want to generate an alert message saying he hasnt entered any values for the field he skipped. Its not a error, but just a warning message.

I can get this working with Plain Javascript, just wondering if the validator framework has any implementation for this

Thanks for all your suggestion.
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
struts validation framework provides true/false answer to a validation question (and display an error message). if you want to use 'warnings', you have to pull lots of tricks. it's best done using plain javascript; otherwise, you need to do full validation and display an error message stating that the first field is required.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
I agree. Here's the link: http://aspose.com/file-tools
subject: Struts Validation using Struts Framework
It's not a secret anymore!