Avoid routes duplication ver 3.12.1

I let users write part or whole route
Is there any method to check if the route generate duplicates before to register it ?
Would be perfect if it also possible to get which pattern is causing duplication

If you are trying to generate routes dynamically then consider using database or json file to store routes path and do check if a route is already saved or not while saving a new route.

Routes are already in database but you can not avoid duplicates.

1 when you are using parameters /{lang}/… or optional parameters

2 when you permit to users to write a part of route like a permalink /…/…//…