IntelliJ Java IDE
The moose likes Spring and the fly likes white spaces are not recognizing in validate() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "white spaces are not recognizing in validate()" Watch "white spaces are not recognizing in validate()" New topic
Author

white spaces are not recognizing in validate()

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi
am using but here this is not validating for any whitespaces, just validating for empty field.
Is there any other way to recognize white spaces between a word?

thanks ,
Indu
Christophe Verré
Marshal

Joined: Nov 24, 2005
Posts: 14361

rejectIfEmptyOrWhitespace checks for null, "", or only whitespaces (e.g. " "). You'll have to make your own Validator for anything else.


[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Is it wont check if I give some thing like val idator? (space between val and idator)
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 461

indu iyengar wrote:Is it wont check if I give some thing like val idator? (space between val and idator)

No, it won't check for this condition. You have to write your own validation technique for this..


Regards, Prasad
SCJP 5 (93%)
 
 
subject: white spaces are not recognizing in validate()
 
Threads others viewed
Parsing XML using DOM
Converting an object into an XML
white spaces and CPU time
Ignoring white space
Does XML preserve white spaces
developer file tools