class LanguageCodeValidator implements ValueValidator {

    @Override
    public void validate(String value) throws XDSMetaDataException {
        notNull(value, "value cannot be null");
        metaDataAssert(CODE_PATTERN.matcher(value).matches(),
                INVALID_LANGUAGE_CODE, value);
    }

}