File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts validator" Watch "Struts validator" New topic
Author

Struts validator

jibs parap
Ranch Hand

Joined: Dec 07, 2004
Posts: 134
.travel extension in the email id is failing. In the code I was given, it uses EmailValidator class of 'commons-validator.jar'. I'd be able to know whether .travel is valid if I look at the EmailValidator api. But how do I know the version of commons-validator.jar, I should be looking at, the API for.

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

commons-validator, which isn't part of Struts, should give the library version in the manifest file.
jibs parap
Ranch Hand

Joined: Dec 07, 2004
Posts: 134
Thanks David. I had looked at that earlier; but ignored the key 'Implementation-Version'.

Checked the API but it doesn't give the valid domain. Any idea?

Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yeah, I'd try asking on a commons-validator mailing list/forum, or simply looking in the source, since it's available.

I'd also point out that commons' email validation, at least as of 1.2.0 and 1.3.1, doesn't necessarily check for valid top-level domains. From the API:

For example, an address like nobody@noplace.somedog will pass validator, even though there is no TLD "somedog"
jibs parap
Ranch Hand

Joined: Dec 07, 2004
Posts: 134
Thanks for your time on this Dave.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Struts validator
 
Similar Threads
Struts Validator Framework error
Struts - Error - "Cannot find ActionMappings or ActionFormBeans collection"
Struts 1.1 / Tomcat 5.0.16 - "Servlet Action is not available"
Start with Struts - newbie
unable to validate using struts 1.2.2 version