<?php

// id corporate
$CFG['globalEntity']['::CorporateCreditCard']['idCorporate']['mandatory'] = true;
$CFG['globalEntity']['::CorporateCreditCard']['idCorporate']['invisible'] = false;
$CFG['globalEntity']['::CorporateCreditCard']['idCorporate']['validation'] = ['minValue' => 1, 'type' => 'int'];

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

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

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