There is, unfortunately, no direct method, through the API, to solve this problem.
Currently, nor the API v1 nor v2 offers an “endpoint” allowing us (third-party devs) to run a search to fetch a list of navigational “points” (such as VORs & waypoints) based on a regular string or regex.
I doubt IF will expose such an “endpoint” for the Connect API. A couple of years ago, they started to use Navblue as their primary source of navigational data (source: IF’s front page). You can now see where lies the issue… We could otherwise quickly reverse engineer Navblue’s entire Navigation+ database for free.
To solve it then, you must then use your own nav database. If the name can be found repeatedly, you can then send a lat/long coordinate to infinite flight instead of a “simple” name.
To garner the necessary data you can use this repo (IF’s original source before Navblue) which is maintained primarily by volunteers from the IFAE team :
NOTE : I have not linked the latest version. Several JSON files were deleted (e.g. Fixes.json) for no explicitly stated reason after a PR two months ago (07/09).
Alternatively (or as a complement), after you have set the flight plan, you can query the API for that FPL (with all the “proper” coordinates). From there, you can analyse it for any suspicious entries based on the coordinates provided.