# checkIfLocaleLooksValid

Tests if an argument matches the regex pattern typical for Battle.net locales.

This function does not determine whether the locale exists in Battle.net API. For locale validation see validateLocale.

const BlizzAPI = require('blizzapi');

console.log(BlizzAPI.checkIfLocaleLooksValid('en_US'));
// true

console.log(BlizzAPI.checkIfLocaleLooksValid('pl_PL'));
// true

console.log(BlizzAPI.checkIfLocaleLooksValid('non_EXISTENT'));
// false

Last Updated: 7/31/2019, 4:28:31 PM