my dog learned polymorphism*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 9291
    
  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
 
Consider Paul's rocket mass heater.
 
subject: What is the difference between required and requiredstring validator classes
 
Similar Threads
difference validation ,validator-rules
struts2 radio button validation
Struts
short-circuit attribute not working in validation file
error in validation