<?php

// id customer
$CFG['globalEntity']['::CustomerCreditCard']['idCustomer']['mandatory'] = true;
$CFG['globalEntity']['::CustomerCreditCard']['idCustomer']['invisible'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['idCustomer']['validation'] = ['minValue' => 1, 'type' => 'int'];

// number
$CFG['globalEntity']['::CustomerCreditCard']['number']['mandatory'] = true;
$CFG['globalEntity']['::CustomerCreditCard']['number']['invisible'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['number']['validation'] = ['maxLength' => 25];

// expire date
$CFG['globalEntity']['::CustomerCreditCard']['expireDate']['mandatory'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['expireDate']['invisible'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['expireDate']['validation'] = ['maxLength' => 7];

// company
$CFG['globalEntity']['::CustomerCreditCard']['company']['mandatory'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['company']['invisible'] = false;
$CFG['globalEntity']['::CustomerCreditCard']['company']['validation'] = ['allowedValues' => array_keys($CFG['creditCardVendors'])];