tnx-shared 5.1.480 → 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 +19 -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 +16 -1
- package/esm2015/components/crud/crud-form/crud-form.component.js +1 -1
- package/fesm2015/tnx-shared.js +16 -1
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -12990,6 +12990,9 @@
|
|
|
12990
12990
|
|
|
12991
12991
|
var _b, _c;
|
|
12992
12992
|
function isNotEmpty(value, control) {
|
|
12993
|
+
if (!!value && typeof (value) == 'string') {
|
|
12994
|
+
value.trim();
|
|
12995
|
+
}
|
|
12993
12996
|
if (control instanceof AddressControlSchema) {
|
|
12994
12997
|
if (value == null || value === '')
|
|
12995
12998
|
return false;
|
|
@@ -13226,6 +13229,21 @@
|
|
|
13226
13229
|
};
|
|
13227
13230
|
return AtLeastOneRowTableValidator;
|
|
13228
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
|
+
}());
|
|
13229
13247
|
var validFunction = (_b = {},
|
|
13230
13248
|
_b[exports.Operator.greater] = function (value1, value2) { return value1 > value2; },
|
|
13231
13249
|
_b[exports.Operator.greaterThanEqual] = function (value1, value2) { return value1 >= value2; },
|
|
@@ -64334,6 +64352,7 @@
|
|
|
64334
64352
|
exports.TableSchema = TableSchema;
|
|
64335
64353
|
exports.TagSeparator = TagSeparator;
|
|
64336
64354
|
exports.TaiLieuComponent = TaiLieuComponent;
|
|
64355
|
+
exports.TaxCodeValidator = TaxCodeValidator;
|
|
64337
64356
|
exports.TemplateConstant = TemplateConstant;
|
|
64338
64357
|
exports.TemplateControlSchema = TemplateControlSchema;
|
|
64339
64358
|
exports.TemplateInstanceService = TemplateInstanceService;
|