Does the struts validator is good enough to replace all the code written in javascript.
Yes, it's good enough. You would be writing your validation code in straight Java rather than javascript. Struts has some tags for easy display of error messages, and it uses properties files for message resources so you can get away from hard coding the error messages.
Something to consider is that your javascript validation, I would assume, is occuring on the client side. If you use struts, the validation occurs server-side, which of course requires a post. If your app is running on just a LAN, like on a corporate intranet, perhaps the performance difference isn't enough to matter. If it's running on the Internet and it's important to you or your customer to give a very quick response on validation (as opposed to "they screwed up, they can wait," which is also okay), then you may want to at least keep javascript validation for the most common errors.
One course of action is to put the validation in both places. That way your users still get an instant response, but if somebody hacks a post to your page or goes through an API or Web service rather than going through the UI, you can still validate the data coming in. That may be overkill for your purposes though.
Have fun!