@trackunit/react-form-components 0.1.60 → 0.1.62
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.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/package.json +2 -2
package/index.cjs.js
CHANGED
|
@@ -2761,6 +2761,7 @@ const useGetPhoneValidationRules = () => {
|
|
|
2761
2761
|
const getPhoneNumberValidationRules = React.useCallback((skipValidation = false) => {
|
|
2762
2762
|
const defaultRules = {};
|
|
2763
2763
|
const pattern = {
|
|
2764
|
+
...defaultRules,
|
|
2764
2765
|
validate: (value) => {
|
|
2765
2766
|
const validationResult = t(`phoneField.error.${validatePhoneNumber(value)}`);
|
|
2766
2767
|
return !validationResult || !value || validationResult;
|
|
@@ -2769,7 +2770,6 @@ const useGetPhoneValidationRules = () => {
|
|
|
2769
2770
|
return !skipValidation
|
|
2770
2771
|
? {
|
|
2771
2772
|
...pattern,
|
|
2772
|
-
...defaultRules,
|
|
2773
2773
|
}
|
|
2774
2774
|
: defaultRules;
|
|
2775
2775
|
}, [t]);
|
package/index.esm.js
CHANGED
|
@@ -2742,6 +2742,7 @@ const useGetPhoneValidationRules = () => {
|
|
|
2742
2742
|
const getPhoneNumberValidationRules = useCallback((skipValidation = false) => {
|
|
2743
2743
|
const defaultRules = {};
|
|
2744
2744
|
const pattern = {
|
|
2745
|
+
...defaultRules,
|
|
2745
2746
|
validate: (value) => {
|
|
2746
2747
|
const validationResult = t(`phoneField.error.${validatePhoneNumber(value)}`);
|
|
2747
2748
|
return !validationResult || !value || validationResult;
|
|
@@ -2750,7 +2751,6 @@ const useGetPhoneValidationRules = () => {
|
|
|
2750
2751
|
return !skipValidation
|
|
2751
2752
|
? {
|
|
2752
2753
|
...pattern,
|
|
2753
|
-
...defaultRules,
|
|
2754
2754
|
}
|
|
2755
2755
|
: defaultRules;
|
|
2756
2756
|
}, [t]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.62",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@trackunit/css-class-variance-utilities": "*",
|
|
21
21
|
"@trackunit/i18n-library-translation": "*",
|
|
22
22
|
"zod": "3.22.4",
|
|
23
|
-
"react-hook-form": "7.
|
|
23
|
+
"react-hook-form": "7.53.0",
|
|
24
24
|
"tailwind-merge": "^2.0.0"
|
|
25
25
|
},
|
|
26
26
|
"module": "./index.esm.js",
|