Wrap long line, fix regex.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1626 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -58,7 +58,8 @@ public class KeyUtil
|
|||||||
public static boolean verifyLuhn (String key)
|
public static boolean verifyLuhn (String key)
|
||||||
{
|
{
|
||||||
// If there is a non digit, or it is all zeros.
|
// If there is a non digit, or it is all zeros.
|
||||||
if (StringUtil.blank(key) || key.matches("\\D") || key.matches("^[0]+$")) {
|
if (StringUtil.blank(key) || key.matches(".*\\D.*") ||
|
||||||
|
key.matches("^[0]+$")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user