"use strict"; const wrapError = require("@validatem/wrap-error"); const isUppercase = require("@validatem/is-uppercase"); const hasLengthOf = require("@validatem/has-length-of"); // TODO: We do not check against a list of *valid* country codes currently, because that list can change. Figure out a way to publish those as a package separately, and have them auto-update, while also accounting for potential edge cases with eg. disputed territories. module.exports = wrapError("Must be an ISO-3166-1 alpha-3 (3 character) country code", [ isUppercase, hasLengthOf(3) ]);