You are here

function countries_api_validate_format in Country codes API 6

Same name and namespace in other branches
  1. 5 countries_api.module \countries_api_validate_format()

Function to validate format argument

Parameters

$format: Input format to validate

Return value

boolean Return if it is a valid format

1 call to countries_api_validate_format()
countries_api_get_array in ./countries_api.module
Function to return an associative array of countries with key/values based on args Can be used to get results for FAPI form options.

File

./countries_api.module, line 308
Countries API provides an API for official and up-to-date ISO 3166 country codes (alpha-2 and alpha-3) and names (official short names).

Code

function countries_api_validate_format($format) {
  return in_array($format, countries_api_get_formats());
}