Announcement

Collapse
No announcement yet.

Validate correctly entered email and phone fields in Checkout 00

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Validate correctly entered email and phone fields in Checkout 00

    A client is having issues with her customer base who seem determined not to provide their email addresses and phone numbers.

    This describes a favourite ploy that passes Sellerdeck's current level of scrutiny:

    Click image for larger version

Name:	anthingwilldo.png
Views:	165
Size:	8.7 KB
ID:	554934
    input type="email" and "tel" as appopriate

    Is there a script modification or something that will check that a proper email adress and phone number has been added?

    I know there is a limit to how much the great British public can be controlled (!) but I did wonder if there was a better way than current?

    Thank you!
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Could this be an old site?

    Modern SellerDeck uses type="email" instead of type="text" for email fields so it's automatically checked by most browsers.

    You could also add:
    Code:
    pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}"
    To the email input field to enhance checking.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman, input type="email" and "tel" as appopriate are in place (it is 16.1.*)

      I have coincidentally just discovered pattern and that seems to be helping greatly.

      https://stackoverflow.com/questions/...tern-attribute

      Also minimum length:

      https://developer.mozilla.org/en-US/...utes/minlength

      Adapted Invoice email field:

      Code:
      <div class="InvoiceField" >
      <label><span id="idINVOICEEMAILlabel" class="actrequired" ><Actinic:Variable Name="InvoicePrompt012"/>*</span></label>
      <div class="checkoutFormField" >
      <input type="email" id="idINVOICEEMAIL" name="INVOICEEMAIL" size="30" maxlength="254" value="<actinic:variable name="InvoiceEmail" selectable="false" />" tabindex="NETQUOTEVAR:TABINDEXINVOICEEMAIL" class="minl"
      lang="en"
      minlength="12"
      autocapitalize="off" spellcheck="false" autocorrect="off"
      autocomplete="on"
      required=""
      inputmode="email"
      pattern="(?![_.-])((?![_.-][_.-])[a-zA-Z\d_.-]){0,63}[a-zA-Z\d]@((?!-)((?!--)[a-zA-Z\d-]){0,63}[a-zA-Z\d]\.){1,2}([a-zA-Z]{2,14}\.)?[a-zA-Z]{2,14}" />
      </div>
      </div>
      <actinic:block if="%3cactinic%3avariable%20name%3d%22InvoicePrompt023Visible%22%20%2f%3e">
      <div class="InvoiceField" >
      <label><span id="idINVOICEEMAIL_CONFIRMlabel" class="actrequired" ><actinic:variable name="InvoicePrompt023" /> *</span></label>
      <div class="checkoutFormField" >
      <input type="email" id="idINVOICEEMAIL_CONFIRM" name="INVOICEEMAIL_CONFIRM" size="30" maxlength="255" value="<actinic:variable name="InvoiceEmailConfirm" />" tabindex="NETQUOTEVAR:TABINDEXINVOICEEMAILCONFIRM" class="minl"
      lang="en"
      minlength="12"
      autocapitalize="off" spellcheck="false" autocorrect="off"
      autocomplete="on"
      required=""
      inputmode="email"
      pattern="(?![_.-])((?![_.-][_.-])[a-zA-Z\d_.-]){0,63}[a-zA-Z\d]@((?!-)((?!--)[a-zA-Z\d-]){0,63}[a-zA-Z\d]\.){1,2}([a-zA-Z]{2,14}\.)?[a-zA-Z]{2,14}" />
      </div>
      </div>
      </actinic:block>
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        You can also add an inlne style above the telephone and email fields:

        Code:
        <style>
        input:invalid {
        background-color:#FFDAE0;
        background-color: rgba(255,218,224,1);
        box-shadow:0 0 0 2px red;
        }
        </style>
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          There are various tests and checks you can do but at the end of the day if someone doesn't want to give their details they're just going to make up something that will pass whatever checking is put in place.

          But I guess we also have to recognise that if a client wants more checking then they won't be happy without more checking so more checking it is.



          -----------------------------------------

          First Tackle - Fly Fishing and Game Angling

          -----------------------------------------

          Comment


            #6
            If the client uses Loqate, then I think that can be configured to check email addresses and phone numbers as well as the postal address. But I believe there is an additional charge for each.
            Bruce Townsend
            Ecommerce Product Manager
            Sellerdeck Ecommerce Solutions

            Comment

            Working...
            X