You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

mobile number duplication on CP and agent desktop

edited Jun 7, 2022 1:23PM in General Technical Discussions 7 comments

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') {

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!