Hi Warren,
You’ll have to test the behavior on various platforms, but I think you could read the URL (in the listener), do your own logic to determine if it’s “valid” or not (in your estimation, whatever logic you consider makes it so), then do either of the following depending on what is happening:
- If the URL is “invalid”, stop loading it:
https://docs.coronalabs.com/api/type/WebView/stop.html
- If the URL loads, and you get a “loaded” event from the “urlRequest” event, use the “back” function to return to the previous page:
https://docs.coronalabs.com/api/event/urlRequest/type.html
https://docs.coronalabs.com/api/type/WebView/back.html
Hope this helps,
Brent