zendframework / zend-validator

Validator component from Zend Framework
BSD 3-Clause "New" or "Revised" License
181 stars 136 forks source link

Zend_Validate_CreditCard return the valid type? #258

Closed zerocarbthirty closed 5 years ago

zerocarbthirty commented 5 years ago

Hello, I have a question regarding the using of Zend_Validate_CreditCard.

Is there any way to make it return the type of card if it turns out to be valid?

froschdesign commented 5 years ago

@zerocarbthirty First: Zend_Validate_CreditCard doesn't belongs to this component. It's an old class from version 1 of Zend Framework. This version 1 is no longer supported and the end of life was on 2016-09-28.

Is there any way to make it return the type of card if it turns out to be valid?

And the new validator Zend\Validator\CreditCard returns only true or false. You can not get the type of card.

https://docs.zendframework.com/zend-validator/validators/credit-card/