This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
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
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply 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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: What is the difference between required and requiredstring validator classes
 
Similar Threads
difference validation ,validator-rules
Struts
short-circuit attribute not working in validation file
error in validation
struts2 radio button validation