Vee-validate - show error if input does not return an object - vue.js

I'm using Vee-validate in my Vue.js project, where in the purchase flow I have an input where I write a postal code and a list of Dealers show appear if they serve the postal code.
However, and my question, is there a way for vee-validate to check if there are no dealers associated to that postal code? So that the user knows to write up another postal code until they can find a dealer.
Thanks for your help!

Related

How can change my data key values to variables

i am korean coding beginner. so if my question is so foolish. please forgive me. it is my first challange to be frontend.
my intention is...
1 when i clicked button on bottom of page, product data is registered and appear alert of registration success.
2.page is routing by dynamic routing method and routed page is show data of product (name, seller, detail, price)
what i use...
1 GQL METHOD
What is problem?
i used GQL CODE in page which will be routed, but i think it is not correct code. but i tried best... i have to make data key values(seller, name, price and so on...) to variables so i have to write code different with query sentence just for searching data in playground.
how do i have to change this query GQL code in vscode brown color?
i refer to the code for routed page fetchboard query i wrote when i learn coding by my online lesson. but it is not useful in query fetch product... i can,t understand the principle of change data key value to variable in gql

Get vehicle registration details from apisetu.gov.in API

I am trying to implement a feature in my website where user can input the Vehicle's Registration Number and pull out the details of the vehicle and owner. Similar to https://jankari.loconav.com/rc
There is an API provided by the government of India to achieve this - https://ndh.digitallocker.gov.in/public/api/transport#/APIs/drvlc but there is no documentations involved. I am not even sure how to use it in postman. There are no options to generate an API key etc. When you click the "try" button it just shows you a pre-written json which gives error after you execute it. Can some help me find a way to build something similar to https://jankari.loconav.com/rc using the http://apisetu.gov.in
Thanks in advance

Getting state code and country code from area code of phone number

I need to extract the state code and the country code from incoming web-to-lead phone number in Salesforce
Example if the area code of a phone number is (421)
I need a way to populate the state code and the country code with the appropriate data
there is a way for this but it needs backend coding for this in which whenever a lead is generated from the web it checks the area code from the phone number and decides what will be the appropriate state code and country code for the given area code.
And with the help of backend coding, we can set the add and remove the area codes dynamically.
But right now salesforce doesn't have any automated based feature for this requirement.

Google Places autocomplete API not returning postal codes

I have been googling this for hours and I have not found a solution. When I call:
"https://maps.googleapis.com/maps/api/place/autocomplete/json?input="+WebUtility.UrlEncode(MYADDRESSSPEC)+"&key="+MYAPIKEY;
I get things like:
123 Main St, Somewhere, Ohio United States
123 Main St, Somewhere Else, Indiana, United States
I've looked at the optional arguments and I cannot find one for ZIP/postal code. I noticed the textsearch API does return ZIP codes. I could run it through autocomplete as someone is typing the address and THEN run each result through the textsearch API but I want to accomplish this in just ONE web service call. Does anyone know how?
Thanks in advance!
I don't think the autocomplete API supports returning postcodes in the predictions array. Your best bet (albeit cumbersome) is to do the autocomplete query and run a details query for each of the place_id entries returned.
You can add the type=(regions) filter to the url (as query param) and then you can search on postal codes. It is not completely fine because it still can't find all the postal codes I think. But this might be what you need.

Can FedEx shipping methods be suppressed when an address contains a P.O. Box in Hotcakes?

We are wondering if in Hotcakes 1.10.3, if the shipping method lookup can recognize if an address entered is a P.O. Box before returning available shipping methods.
Why we ask - our client is primarily using FedEx to deliver shipiments, but would like to default to USPS shipping methods when a customer enters a P.O. box as FedEx doesn't deliver to P.O. boxes.
I've tried out a few PO box addresses, and in our current build FedEx rates still get returned. Is there any way to block FedEx from returning if a P.O. box is entered as an address in Checkout?
Thanks much.
Disclaimer: I work for Hotcakes.
I looked at this in our code base and it was interesting to see that we're simply taking the address entered by the customer in checkout and passing it directly to the shipping provider (e.g., FedEx). In my testing using FedEx specifically, they're returning rates from their own web service, regardless to whether the address is a P.O. Box or not. They don't seem to be checking for this themselves. I didn't check the other built-in live rate providers for this answer.
I order to workaround this, you can detect this yourself and prevent this from happening in your custom viewset. However, you should be aware that doing this would really require that you test all of the use cases that you expect for your target customers to fall into on your site.
In your viewset, find the Checkout.js file in the Scripts folder.
In this file, you'll want to look for the following method and apply a check to see if the Address 1 field is a P.O. Box or not. If it is, remove the FedEx rates from the list of shipping providers that received rates. This will prevent your customer from selecting unsupported rates.
RefreshShippingRates
An example of that check in this JS file might look like this:
var address1Value = $('#shippingaddress').val()
if (address1Value.substring(0, 4) == "P.O.") {
// iterate through each rate to see if it needs to be removed
}