Announcement

Collapse
No announcement yet.

I want to call an email validator from OSEL.

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

    I want to call an email validator from OSEL.

    Hello forum: I want to call this API using mvt:call during OSEL load.
    Have been trying to do it with javascript on OCST submit but I'm stumped there. Timing issue.
    Page submits before API replies.
    The API:
    xhr.open('GET', 'https://email-checker.p.rapidapi.com/verify/[email protected]');
    xhr.setRequestHeader('x-rapidapi-key', '2bc0b6e2aamsheb878d99ffdb850p1e5a07jsn417xxxxxxxx ');
    xhr.setRequestHeader('x-rapidapi-host', 'email-checker.p.rapidapi.com');

    How would I set the request headers with mvt:call?

    Or does Miva have a function to do this?

    Cheers, Larry

    Larry
    Luce Kanun Web Design
    www.facebook.com/wajake41
    www.plus.google.com/116415026668025242914/posts?hl=en



    #2
    From the OSEL Page:

    Code:
    <mvt:do file="g.module_library_utilities" name="g.is_valid_email" value="Email_Validate(g.Basket:bill_email)" />
    <mvt:if expr="g.is_valid_email EQ 1">
    Email Address Format is Correct!
    </mvt:if>
    Found on Miva Docs.

    http://www.alphabetsigns.com/

    Comment


      #3
      Thank you Alpha: This is good information for possible future use. I will retain it. Actually I decided to call the email validator with the onblur event from the ShipEmail <input tag on OCST. This allows the edit and any errors to be shown prior to OCST submit.
      Thank you again, Larry
      Larry
      Luce Kanun Web Design
      www.facebook.com/wajake41
      www.plus.google.com/116415026668025242914/posts?hl=en


      Comment


        #4
        Great. And you could also try input type="email"

        Example:

        Code:
        <input class="validate" type="email" name="ShipEmail" id="ShipEmail" value="&mvte:global:ShipEmail;" required="required" aria-labelledby="ShipEmail" autocomplete="email">
        ( Sometime the autocomplete field causes errors created by the user so you could remove it.)
        http://www.alphabetsigns.com/

        Comment


          #5
          Upon further investigation I realized that the email validator was not 100% accurate. We were going to use the validator to identify our credit card validator but because of it's inaccuracy we decided not to use it. Don't want to eliminate real customers.
          Larry
          Luce Kanun Web Design
          www.facebook.com/wajake41
          www.plus.google.com/116415026668025242914/posts?hl=en


          Comment

          Working...
          X