mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 14:38:39 +00:00
change from exception to bool return
This commit is contained in:
parent
16f8566ac3
commit
e8e31758c1
|
|
@ -33,7 +33,7 @@ final class CreditCard extends ValidatorAbstract
|
||||||
public static function isValid($value, array $constraints = null) : bool
|
public static function isValid($value, array $constraints = null) : bool
|
||||||
{
|
{
|
||||||
if (!\is_string($value)) {
|
if (!\is_string($value)) {
|
||||||
throw new \InvalidArgumentException();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = \preg_replace('/\D/', '', $value) ?? '';
|
$value = \preg_replace('/\D/', '', $value) ?? '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user