mobile number duplication on CP and agent desktop
i have created the Contact.Phones.MOBILE.Number field on the create account page. I want to stop the duplication of the mobile number i have added the below script/code on the validaiton.php.
how can i have this resolved?
private static function checkDataType($value, $label, $apiFieldName, $fieldMetadata) {
$isCommonEmailType = in_array($apiFieldName, array('Contact.Emails.PRIMARY.Address', 'Contact.Phones.MOBILE.Number', 'Contact.Emails.ALT1.Address', 'Contact.Emails.ALT2.Address'));
$dataType = $fieldMetadata->COM_type;
if($dataType === 'Integer') {
$method = 'validInteger';
}
// @codingStandardsIgnoreStart
else if($isCommonEmailType || ($fieldMetadata->usageType && $fieldMetadata->usageType === ConnectPHP\PropertyUsage::EmailAddress)) {
$method = 'validEmail';
}
// @codingStandardsIgnoreEnd
else if($apiFieldName === 'Incident.CustomFields.c.alternateemail') {