[ 
https://issues.apache.org/jira/browse/VALIDATOR-415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebb resolved VALIDATOR-415.
----------------------------
    Resolution: Fixed

URL: http://svn.apache.org/viewvc?rev=1782740&view=rev
Log:
VALIDATOR-415 Extend syntax to allow disjoint lengths

Modified:
    
commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
    
commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/CreditCardValidatorTest.java


> Simplify building new CreditCard validators
> -------------------------------------------
>
>                 Key: VALIDATOR-415
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-415
>             Project: Commons Validator
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: 1.6
>
>
> Credit card validators currently rely on regexes.
> Whilst these are flexible enough for the purpose, it is difficult to define 
> the REs and hard to read them.
> It would be simpler if the user could provide the prefix ranges and lengths, 
> for example:
> Amex: "34", length 15
> Discover: "644" -> "65", length 16
> (both the above have other ranges which would need to be provided separately)
> This can then be converted internally into the appropriate validation 
> routines.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to