aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validation using Struts Framework" Watch "Struts Validation using Struts Framework" New topic
Author

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>
 
Don't get me started about those stupid light bulbs.
 
subject: Struts Validation using Struts Framework
 
Similar Threads
confused with use of validation framework
how do i on struts internal logging
html:javascript question
how to check fields in struts validator
Calling FieldCheck methods from validate() method