aspose file tools*
The moose likes Struts and the fly likes What is the difference between required and requiredstring validator classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is the difference between required and requiredstring validator classes" Watch "What is the difference between required and requiredstring validator classes" New topic
Author

What is the difference between required and requiredstring validator classes

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
What is the difference between required and requiredstring validator classes while using them for validating form fields?


I am slow but sure
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

required validator only checks that the request parameter exists i.e. its not null. It will allow empty value but the required string validator checks that the parameter is not only present, but its value should not be blank...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
jQuery in Action, 2nd edition
 
subject: What is the difference between required and requiredstring validator classes