tnx-shared 5.1.481 → 5.1.482
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +16 -0
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/validators.d.ts +4 -0
- package/classes/base/validators.d.ts.map +1 -1
- package/esm2015/classes/base/validators.js +13 -1
- package/esm2015/components/crud/crud-form/crud-form.component.js +1 -1
- package/fesm2015/tnx-shared.js +13 -1
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -13229,6 +13229,21 @@
|
|
|
13229
13229
|
};
|
|
13230
13230
|
return AtLeastOneRowTableValidator;
|
|
13231
13231
|
}());
|
|
13232
|
+
var TaxCodeValidator = /** @class */ (function () {
|
|
13233
|
+
function TaxCodeValidator() {
|
|
13234
|
+
}
|
|
13235
|
+
TaxCodeValidator.prototype.validate = function (event) {
|
|
13236
|
+
var value = event.value;
|
|
13237
|
+
if (value == null || value === '')
|
|
13238
|
+
return true;
|
|
13239
|
+
var re = /^([0-9]){10}$|^([0-9]){10}(-)([0-9]){3}$/;
|
|
13240
|
+
return re.test(String(value).toLowerCase());
|
|
13241
|
+
};
|
|
13242
|
+
TaxCodeValidator.prototype.getError = function () {
|
|
13243
|
+
return 'Không đúng định dạng mã số thuế';
|
|
13244
|
+
};
|
|
13245
|
+
return TaxCodeValidator;
|
|
13246
|
+
}());
|
|
13232
13247
|
var validFunction = (_b = {},
|
|
13233
13248
|
_b[exports.Operator.greater] = function (value1, value2) { return value1 > value2; },
|
|
13234
13249
|
_b[exports.Operator.greaterThanEqual] = function (value1, value2) { return value1 >= value2; },
|
|
@@ -64337,6 +64352,7 @@
|
|
|
64337
64352
|
exports.TableSchema = TableSchema;
|
|
64338
64353
|
exports.TagSeparator = TagSeparator;
|
|
64339
64354
|
exports.TaiLieuComponent = TaiLieuComponent;
|
|
64355
|
+
exports.TaxCodeValidator = TaxCodeValidator;
|
|
64340
64356
|
exports.TemplateConstant = TemplateConstant;
|
|
64341
64357
|
exports.TemplateControlSchema = TemplateControlSchema;
|
|
64342
64358
|
exports.TemplateInstanceService = TemplateInstanceService;
|