Permalink
Browse files

Validate_IR, tiny bug in creditCard method fixed.

git-svn-id: http://svn.php.net/repository/pear/packages/Validate/trunk@309412 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 1a59ac1 commit ffbd4ebd24193570f4856f99c005ab73a0cf0dee @hemmat hemmat committed Mar 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Validate/IR.php
View
@@ -60,7 +60,7 @@ function numeric($check)
*/
function creditCard($check)
{
- $pattern = '/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$/';
+ $pattern = '/^[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}$/';
return preg_match($pattern, $check);
}

0 comments on commit ffbd4eb

Please sign in to comment.