UNPKG

xliff-generator

Version:

A simple module to create xliff files

17 lines (16 loc) 625 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const errors_1 = require("../errors"); const string_util_1 = require("../utils/string-util"); class ProductNameValidator { /** * @param productName {string} * @throws {ValidationError} will be thrown if an error during the validation occured */ validate(productName) { if (string_util_1.StringUtil.isOnlyWhiteSpaces(productName)) { throw new errors_1.ValidationError(`Value '${productName}' is not a valid value for a product name`); } } } exports.ProductNameValidator = ProductNameValidator;