@gudhub/ssg-web-components-library 1.0.34 → 1.0.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/package.json
CHANGED
|
@@ -38,9 +38,11 @@ const emailValidation = (input) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
const phoneValidation = (input) => {
|
|
41
|
-
const regex = /^\d{10}$/;
|
|
41
|
+
// const regex = /^\d{10}$/; // Default strict regex for checking phone number
|
|
42
42
|
|
|
43
|
-
let isValid = regex.test(input.value);
|
|
43
|
+
// let isValid = regex.test(input.value);
|
|
44
|
+
|
|
45
|
+
let isValid = /^\+?\d+$/; // We can write only numbers without special symbols besides "+" sign
|
|
44
46
|
|
|
45
47
|
if (!isValid) {
|
|
46
48
|
input.classList.add('error');
|
|
@@ -10,9 +10,9 @@ class PricesCards extends GHComponent {
|
|
|
10
10
|
|
|
11
11
|
async onServerRender() {
|
|
12
12
|
this.ghId = this.getAttribute('data-gh-id') || null;
|
|
13
|
-
this.
|
|
13
|
+
this.application = this.hasAttribute('application') ? this.getAttribute('application') : undefined;
|
|
14
14
|
|
|
15
|
-
const json = await super.getGhData(this.ghId, this.
|
|
15
|
+
const json = await super.getGhData(this.ghId, this.application);
|
|
16
16
|
|
|
17
17
|
this.cards = json.cards;
|
|
18
18
|
|