In the direction dijit in the widget of WAB I want to define the countryCode: "ES", but with this line of code, if I write a wrong stop, such as "----" and a correct stop, a route is calculated without errors. This is strange.
If I comment the line countryCode: "ES" and then I write a wrong stop and a correct stop, a warning is shown with "No results. There were no result for "----" ". That is OK.
What I want is to have countryCode: "ES" in my code and if I write an wrong stop, the warnning is displayed.
You can do the test copy & paste the attached file code in this sandbox:
and commenting and uncommenting the countryCode: "ES" line.
You can write "moncloa" (Moncloa-Aravaca, Provincia de Madrid, Madrid, ESP) in the first text box and "------" in the second.
Any suggestions?. Best regards.