• medenz

    (@medenz)


    Hi,
    I’ve got a piece of code that validates email. I need to disable that validation, to the user can type number instead of email.
    I’ve changed the email type into text but doesn’t work.
    this is the code:

    
     <input type="text" style="width:100%; text-align:center;" class="cwgstock_email" name="cwgstock_email" placeholder="<?php echo $instock_api->sanitize_text_field($placeholder); ?>" required value="<?php echo $email; ?>" readonly></input>  />
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter medenz

    (@medenz)

    I guess this is a code that related to my question:
    How can I change that to accept numbers?
    <input type=”number” value=”” id=”wcwl_email_1662″ name=”wcwl_email” class=”wcwl_email” placeholder=”Email address”>

    Thread Starter medenz

    (@medenz)

    Latest modification:
    I’ve got a piece of code that validates email. I need to disable that validation, so the user can type a cellphone number instead of an email. What I’ve done: Step 1: Remove @ to accept the number. I’ve searched in *.js files and change code from

    i=/^(([^<>()\[\]\\.,;:\s@”]+(\.[^<>()\[\]\\.,;:\s@”]+)*)|(“.+”))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    to this i=/[0-9]/;

    Step 2: I’ve changed the type to number but it doesn’t work. this is the code:

    <input type=”number” value=”” id=”wcwl_email_1662″ name=”wcwl_email” class=”wcwl_email” placeholder=”Email address”>
    After doing these when I enter a cellphone number instead of an email I receive this error message: “I’m afraid something went wrong with your request. Please try again or contact us for help”

    this is the link that I’m working on: https://atlantic7.ir/nikeorange/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘disable email validation’ is closed to new replies.