Sunnysideup\Ecommerce\Forms\Fields\EcommerceCreditCardField
Allows input of credit card numbers via four separate form fields, including generic validation of its numeric values.
Synopsis
class EcommerceCreditCardField
extends TextField
{
- // methods
- public array getAttributes()
- public void Field()
- public bool|string getTabIndexHTML()
- public void dataValue()
- public void validate()
Hierarchy
Extends
- SilverStripe\Forms\TextField
Tasks
Line | Task |
---|---|
14+ | Validate |
Methods
public
- Field() — renders with EcommerceCreditCardField.ss.
- dataValue()
- getAttributes() — Add default attributes for use on all inputs.
- getTabIndexHTML() — Get tabindex HTML string.
- validate() — checks if a credit card is a real credit card number.