[
https://issues.apache.org/jira/browse/WICKET-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Karlberg updated WICKET-1056:
-----------------------------------
Attachment: CreditCardValidator.patch.gz
This trivial patch strips spaces and dashes explicitly. It's trivial to change
the pattern to strip something else, even \\D, but the more we strip the less
validation this validator actually provides. I'm not entirely sure we should
even apply this patch, but rather prefer that people subclass the validator if
they have less strict validation requirements. At the very least, normalize
your input before storing it in the database, because "00---00000 0 0
0--0" just became a valid credit card number ;)
> CreditCardValidator does not handle spaces or dashes
> ----------------------------------------------------
>
> Key: WICKET-1056
> URL: https://issues.apache.org/jira/browse/WICKET-1056
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.0-beta3
> Reporter: Mark Sandori
> Priority: Minor
> Fix For: 1.3.0-rc2
>
> Attachments: CreditCardValidator.patch.gz
>
>
> The CreditCardValidator assumes that the provided input only contains numbers
> without spaces, dashes, etc.
> The validator should be extended to properly handle these common input
> scenarios, perhaps with an optional attribute around stripping these unwanted
> characters from the input.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.