Drupal 8 : Skip ajax request for some select options


I have a 2 select fields Region and city. City field gets populated based on Region field. I need to display values for city for all values except one.

$region = ['Region', 'Country', 'World'];

I need to do ajax request only if value is region or country. If the value is ‘world’ I need to skip ajax request.

How can I achieve this?

قالب وردپرس