Comment to 'Two Bugs in the Phone Input Field'
  • Hi @Alex T⚜️

    You made my day today. Thank you soooo much. My Regex works now. 

    I am sorry, Bug 1 was not a bug. It was just my lack of knowledge. :)

    Also, thanks for opening a ticket on GitHub to fix the Bug 2.

    Honestly, I didn't know that we should open and close the regex with the # or ~ sign in UNA. The field description text is small and gray, I didn't pay attention to it.

    The regex works fine now but the only problem is that I have lost the ablity to check already existing phone numbers which is availabe in the method function checkPhoneExist($s) when you select: 'Custom Check...' (phoneexist) . I have mentioned about it in my post above.

    As a workaround, I am using the regular expression in conjunction with the option: 'Unique - Check if the field should have unique value.'

    It works great because it checks if the field is unique (if the phone already exist). The only difference is that it gives this error message:

    The field should have unique value

    instead of:

    This phone number is already used by someone.

    That's why I will have to edit this text in Polyglot to have something that will be clear to users.

    My question is: Can you make it possible to use any other Check method (e.g. Regex) without losing the default method: 'Custom Check' (the already existing phone check.)? Meaning using both at the same time.

    Many Thanks