This commit is contained in:
Tben 2023-08-29 08:27:30 +01:00
parent 9c61e83166
commit 70ee0a2c0a
3 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ async function addDbEntry({ dbFullName, tableName, data, tableSchema, duplicateC
if (targetFieldSchema?.pattern) {
const pattern = new RegExp(targetFieldSchema.pattern, targetFieldSchema.patternFlags || "");
if (!pattern.test(value)) {
if (!value?.toString()?.match(pattern)) {
console.log("DSQL: Pattern not matched =>", value);
value = "";
}

View File

@ -83,7 +83,7 @@ async function updateDbEntry({ dbContext, paradigm, dbFullName, tableName, data,
if (targetFieldSchema?.pattern) {
const pattern = new RegExp(targetFieldSchema.pattern, targetFieldSchema.patternFlags || "");
if (!pattern.test(value)) {
if (!value?.toString()?.match(pattern)) {
console.log("DSQL: Pattern not matched =>", value);
value = "";
}

View File

@ -1,6 +1,6 @@
{
"name": "datasquirel",
"version": "1.8.9",
"version": "1.9.0",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"bin": {