• Resolved LarsHdg

    (@larshdg)


    Hi,

    For selecting a phone field, there’s an option for “International”, but the validation defines a 10-digit number ### ### ####, but this applies mostly for US/Can phone numbers, the country code (+1) is missing though.

    In Denmark we have 8 digits usually given by ## ## ## ## or #### #### plus a 2 digit countrycode (+45). For the Faroe Islands it’s a 6 digit number ###### plus a 3 digit country code (+298). Germany is 11 digits ### ######## plus 2 digit (+49), etc. etc.

    A such – how to make the phone field truly International?
    And/or how to add country specific Regular Expression (Regex) validation for the phone field?

    Regex validation is also relevant for other fields like text and digits/numbers.
    All to help the user to enter correctly in the registration process – and to help prevent “fake entries”.

    BR, Lars

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor genetech

    (@genetech)

    Hi,

    Thanks for reaching out to us regarding Pie Register. Currently, option to add custom regex in field validation is not available. Also, we will revamp the “international” validation rule.

    We will update you once we have the fix available.

    Thanks

    Thread Starter LarsHdg

    (@larshdg)

    Hi,

    Sounds good.
    But, meanwhile could you please provide a hook/code for an 8-digit (## ## ## ##) validation – that would enable me to move forward.

    Thanks for your support.

    BR, Lars

    Plugin Contributor genetech

    (@genetech)

    Hi,

    We have removed the minimum 10 digits restriction for now from phone field. Please download and replace files below, and let us know if this works.

    Download link: https://blue.genetechz.com/pieregister_download/pie-register-3.4.4.phone-number-int.zip

    Thanks

    Thread Starter LarsHdg

    (@larshdg)

    Hi,

    Crashed the site! Can’t do anything, but a restore. I installed as a plugin, but I guess that was a mistake, or…? Please advice.

    BR Lars

    Plugin Contributor genetech

    (@genetech)

    Hi,

    You didn’t need to install zipped file as a plugin. It only contains updated files. Now please follow below steps.

    • Install Pie Register plugin.
    • Go to your plugins directory, i.e. “wp-content/plugins” via FTP.
    • Extract the compressed zip file.
    • Replace the files in “pie-register” plugin directory.

    Hope it clears.

    Thanks

    • This reply was modified 5 years ago by genetech.
    • This reply was modified 5 years ago by genetech.
    Thread Starter LarsHdg

    (@larshdg)

    Thanks – my mistake!

    Something else, while testing phone-regex.
    Where does the “Generate Password” button-text come from? I can’t find in the PO-file for translating?

    BR Lars

    Plugin Contributor genetech

    (@genetech)

    Hi,

    We will update translation file in our next version update which will be available by next week.

    Thanks

    Thread Starter LarsHdg

    (@larshdg)

    Hi again,

    The revised code for number of digits in a Phone-number seems to work – thanks!

    I’ll test with user variations; would very much like to be able to enter custom Regex. And that could easily be an option for all fields – to be able to enter the Regex line and you just add/replace in your line for validations like the “$regXinternational_phone = ………”?

    Thanks for your support.

    BR, Lars

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Regex for phone and other field types’ is closed to new replies.