[
https://issues.apache.org/jira/browse/VALIDATOR-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14057555#comment-14057555
]
ASF GitHub Bot commented on VALIDATOR-322:
------------------------------------------
GitHub user bripkens opened a pull request:
https://github.com/apache/commons-validator/pull/1
Deprecate the JS part of commons validator
The JS parts of commons-validator haven't been updated in a while and don't
necessarily follow common security best practices (almost every function uses
`eval`). At the same time there are quite a few issues that are several years
old and haven't been worked upon [1].
For this reason I propose to deprecate (and later remove) the JS component
of commons-validator using JavaDoc / JSDoc mechanisms and with a warning on the
browser's console. All deprecation messages refer to an alternative that is
commonly used and actively maintained to give the users some guidance.
[1]
https://issues.apache.org/jira/browse/VALIDATOR-322?jql=project%20%3D%20VALIDATOR%20AND%20component%20%3D%20JavaScript%20AND%20status%20%3D%20Open%20ORDER%20BY%20priority%20DESC
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bripkens/commons-validator deprecate-js
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-validator/pull/1.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1
----
commit 75f2bc4f3ef73afd747664e7248070620c6b1289
Author: Ben Ripkens <[email protected]>
Date: 2014-07-07T19:39:42Z
Deprecate the JS part of commons validation
----
> Java code and javascript code are not same!
> -------------------------------------------
>
> Key: VALIDATOR-322
> URL: https://issues.apache.org/jira/browse/VALIDATOR-322
> Project: Commons Validator
> Issue Type: Bug
> Components: JavaScript
> Affects Versions: 1.4.0 Release
> Environment: All
> Reporter: Kiran
>
> The email id "user@domain_name.com" is invalid when i check from java
> (EmailValidator.getInstance().isValid("user@domain_name.com")).
> But when I check in javascript, it says it is a valid one
> (jcv_checkEmail('user@domain_name.com')).
> I know it is invalid because it has underscore in domain name.
--
This message was sent by Atlassian JIRA
(v6.2#6252)