@bolttech/form-engine-core 0.0.1-beta.34 → 0.0.1-beta.36
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/index.esm.js +5 -3
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -730,10 +730,11 @@ const custom = (value, masks) => {
|
|
|
730
730
|
if (!masks.custom || !value) return value;
|
|
731
731
|
let mask = '';
|
|
732
732
|
let index = 0;
|
|
733
|
+
let convertedValue = value.replace(/[^\w\s]/gi, '');
|
|
733
734
|
for (let i = 0; i < masks.custom.length; i++) {
|
|
734
735
|
if (masks.custom[i] === '#') {
|
|
735
|
-
if (index <
|
|
736
|
-
mask +=
|
|
736
|
+
if (index < convertedValue.length) {
|
|
737
|
+
mask += convertedValue[index];
|
|
737
738
|
index++;
|
|
738
739
|
} else {
|
|
739
740
|
break;
|
|
@@ -3342,7 +3343,8 @@ class FormCore {
|
|
|
3342
3343
|
if (!this.fields.has(field)) {
|
|
3343
3344
|
/*
|
|
3344
3345
|
* check with João the need for a global mount event for the form
|
|
3345
|
-
* to avoid not displaying this message in some cases
|
|
3346
|
+
* to avoid not displaying this message in some cases (AsFormField)
|
|
3347
|
+
* suggestion: create subscriber to targetField.ON_FIELD_MOUNT
|
|
3346
3348
|
*/
|
|
3347
3349
|
console.warn(`failed to update visibility onto field ${field}`);
|
|
3348
3350
|
} else {
|