Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts validator

 
jibs parap
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
commons-validator, which isn't part of Struts, should give the library version in the manifest file.
 
jibs parap
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your time on this Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic