@optimiser/common 1.0.301 → 1.0.303

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.
@@ -4571,6 +4571,9 @@ function ValidateUserInput(options) {
4571
4571
  }
4572
4572
  field = schemaFields.find(function (x) { return x.Name == fieldName; });
4573
4573
  if (!field) return [3 /*break*/, 52];
4574
+ if ((field.UIDataType == 'date' || field.UIDataType == 'datetime') && IsStringValue(fieldData) && fieldData.trim() == '') {
4575
+ inputFields[fieldName] = null;
4576
+ }
4574
4577
  if (fieldData && IsStringValue(fieldData) && field.UIDataType != 'dropdown') {
4575
4578
  fieldData = fieldData.trim();
4576
4579
  if (["text", "email", "phone"].includes(field.UIDataType)) {
@@ -4662,7 +4665,7 @@ function ValidateUserInput(options) {
4662
4665
  {
4663
4666
  filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
4664
4667
  if (!filter.test(fieldData)) {
4665
- msg = 'Invalid email for ' + field.DisplayName + '!';
4668
+ msg = fieldData + ' is invalid email for ' + field.DisplayName + '!';
4666
4669
  }
4667
4670
  }
4668
4671
  return [3 /*break*/, 51];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.301",
3
+ "version": "1.0.303",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {