@itcase/forms 1.0.53 → 1.0.54
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/dist/itcase-forms.cjs.js
CHANGED
|
@@ -53,8 +53,9 @@ const emailValidation = (value, context) => {
|
|
|
53
53
|
if (!value) {
|
|
54
54
|
return true;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
|
|
57
|
+
// from https://www.regular-expressions.info/email.html
|
|
58
|
+
const regexp = /^[a-za-яёЁ0-9_-]+(?:\.[a-za-яёЁ0-9_-]+)*@(?:[a-za-яёЁ0-9](?:[a-za-яёЁ0-9-]*[a-za-яёЁ0-9])?\.)+[a-za-яёЁ0-9]+$/;
|
|
58
59
|
return regexp.test(String(value).toLowerCase());
|
|
59
60
|
};
|
|
60
61
|
const addRequiredFieldsParamToSchema = schema => {
|
|
@@ -1927,7 +1928,7 @@ const focusOnError = (formElementsList, errors) => {
|
|
|
1927
1928
|
}
|
|
1928
1929
|
}
|
|
1929
1930
|
|
|
1930
|
-
//
|
|
1931
|
+
// The field is covered by the header because header is "sticky",
|
|
1931
1932
|
// that's we scroll manually so that the field falls into the center of the visible area
|
|
1932
1933
|
if (errorFieldElement) {
|
|
1933
1934
|
errorFieldElement.scrollIntoView({
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -43,8 +43,9 @@ const emailValidation = (value, context) => {
|
|
|
43
43
|
if (!value) {
|
|
44
44
|
return true;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
|
|
47
|
+
// from https://www.regular-expressions.info/email.html
|
|
48
|
+
const regexp = /^[a-za-яёЁ0-9_-]+(?:\.[a-za-яёЁ0-9_-]+)*@(?:[a-za-яёЁ0-9](?:[a-za-яёЁ0-9-]*[a-za-яёЁ0-9])?\.)+[a-za-яёЁ0-9]+$/;
|
|
48
49
|
return regexp.test(String(value).toLowerCase());
|
|
49
50
|
};
|
|
50
51
|
const addRequiredFieldsParamToSchema = schema => {
|
|
@@ -1917,7 +1918,7 @@ const focusOnError = (formElementsList, errors) => {
|
|
|
1917
1918
|
}
|
|
1918
1919
|
}
|
|
1919
1920
|
|
|
1920
|
-
//
|
|
1921
|
+
// The field is covered by the header because header is "sticky",
|
|
1921
1922
|
// that's we scroll manually so that the field falls into the center of the visible area
|
|
1922
1923
|
if (errorFieldElement) {
|
|
1923
1924
|
errorFieldElement.scrollIntoView({
|