commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Hauser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VALIDATOR-322) Java code and javascript code are not same!
Date Wed, 07 Jan 2015 04:24:34 GMT

    [ https://issues.apache.org/jira/browse/VALIDATOR-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14267265#comment-14267265
] 

Ralf Hauser commented on VALIDATOR-322:
---------------------------------------

Is the decision to no longer maintain JavaScript a fundamental one or just due to lack of
resources to maintain?
I'd appreciate a discussion whether the approach to have a multi-tiered validation with first
the browser doing the javascript validation or alike and later the server doing the rest is
still desirable.
To offload some onus from the network and server, I still think this is an approach worthwhile
to consider.
As long as the browser side validation doesn't produce false negatives, I would say that "Java
code and javascript code are not same" is acceptable and better than not having javascript
at all.
Commons Validator removing JavaScript while the megatrend is to add more JavaScript everywhere
else looks strange to me...

I'd even go one step further: 
Please complement the javascript routines with the new html5 input tag attribute "pattern"
http://www.w3schools.com/tags/att_input_pattern.asp as this regex approach appears to be even
more efficient on the browser side and less attack-prone.

> 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.3.4#6332)

Mime
View raw message