<?php

///////////////////////////////////////////////////////////////////////////////////////////////////
// Define each field of the current Entity - for each field you can set the following keys: ///////
// 'mandatory', 'invisible' and 'validation'. Use the '_special' field key code to allow adding ///
// extra validations that are not checked automatically. //////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////


// type
$CFG['globalEntity']['::ContactPerson']['type']['mandatory']=true;
$CFG['globalEntity']['::ContactPerson']['type']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['type']['validation']= ['list'=> ['corporate', 'supplier']];
// idCompany
$CFG['globalEntity']['::ContactPerson']['idCompany']['mandatory']=true;
$CFG['globalEntity']['::ContactPerson']['idCompany']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['idCompany']['validation']= ['type'=>'int', 'minValue'=>1];
// title
$CFG['globalEntity']['::ContactPerson']['title']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['title']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['title']['validation']= ['maxLength'=>1];
// lastName
$CFG['globalEntity']['::ContactPerson']['lastName']['mandatory']=true;
$CFG['globalEntity']['::ContactPerson']['lastName']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['lastName']['validation']= ['maxLength'=>100];
// firstName
$CFG['globalEntity']['::ContactPerson']['firstName']['mandatory']=true;
$CFG['globalEntity']['::ContactPerson']['firstName']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['firstName']['validation']= ['maxLength'=>100];
// birthday
$CFG['globalEntity']['::ContactPerson']['birthday']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['birthday']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['birthday']['validation']= ['type'=>'date', 'minValue'=>'1900-01-01', 'maxValue'=>TODAY_ISO];
// idOffice
$CFG['globalEntity']['::ContactPerson']['idOffice']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['idOffice']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['idOffice']['validation']= ['type'=>'int', 'minValue'=>0];
// department
$CFG['globalEntity']['::ContactPerson']['department']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['department']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['department']['validation']= ['maxLength'=>100];
// job
$CFG['globalEntity']['::ContactPerson']['job']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['job']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['job']['validation']= ['maxLength'=>100];
// role
$CFG['globalEntity']['::ContactPerson']['role']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['role']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['role']['validation']= ['maxLength'=>30, 'list'=>$CFG['contactPersonsRolesList']];
// email
$CFG['globalEntity']['::ContactPerson']['email']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['email']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['email']['validation']= ['maxLength'=>100, 'type'=>'email', 'allowedValues'=> ['-']];
// telephone
$CFG['globalEntity']['::ContactPerson']['telephone']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['telephone']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['telephone']['validation']= ['maxLength'=>50];
// telephoneMobile
$CFG['globalEntity']['::ContactPerson']['telephoneMobile']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['telephoneMobile']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['telephoneMobile']['validation']= ['maxLength'=>50];
// fax
$CFG['globalEntity']['::ContactPerson']['fax']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['fax']['invisible']=false;
$CFG['globalEntity']['::ContactPerson']['fax']['validation']= ['maxLength'=>50];
// comments
$CFG['globalEntity']['::ContactPerson']['comments']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['comments']['invisible']=false;
// remarks
$CFG['globalEntity']['::ContactPerson']['remarks']['mandatory']=false;
$CFG['globalEntity']['::ContactPerson']['remarks']['invisible']=false;

?>