@lets-events/react 12.1.8 → 12.1.9

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- > @lets-events/react@12.1.8 build
3
+ > @lets-events/react@12.1.9 build
4
4
  > tsup src/index.tsx --format esm,cjs --dts --external react
5
5
 
6
6
  CLI Building entry: src/index.tsx
@@ -10,14 +10,14 @@
10
10
  CLI Target: es6
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 375.90 KB
14
- CJS ⚡️ Build success in 258ms
15
13
  ESM dist/QuillComponent-EIWPUIIH.mjs 13.81 KB
16
14
  ESM dist/chunk-TU7LKUXZ.mjs 61.98 KB
17
- ESM dist/index.mjs 277.60 KB
18
- ESM ⚡️ Build success in 274ms
15
+ ESM dist/index.mjs 277.81 KB
16
+ ESM ⚡️ Build success in 323ms
17
+ CJS dist/index.js 376.11 KB
18
+ CJS ⚡️ Build success in 324ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 5155ms
20
+ DTS ⚡️ Build success in 5233ms
21
21
  DTS dist/index.d.mts 388.87 KB
22
22
  DTS dist/index.d.ts 388.87 KB
23
23
  ⠙
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lets-events/react
2
2
 
3
+ ## 12.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Validate RG
8
+
3
9
  ## 12.1.8
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -11111,7 +11111,13 @@ var IdentityDocumentNumberFormField = ({
11111
11111
  name,
11112
11112
  label,
11113
11113
  required,
11114
- placeholder: placeholder || "__.___.___-_"
11114
+ placeholder: placeholder || "__.___.___-_",
11115
+ validate: (value) => {
11116
+ const isEmpty = value.length === 0;
11117
+ if (!required && isEmpty) return true;
11118
+ if (value.length >= 3) return true;
11119
+ return validationErrorMessage;
11120
+ }
11115
11121
  }
11116
11122
  );
11117
11123
  };
package/dist/index.mjs CHANGED
@@ -8530,7 +8530,13 @@ var IdentityDocumentNumberFormField = ({
8530
8530
  name,
8531
8531
  label,
8532
8532
  required,
8533
- placeholder: placeholder || "__.___.___-_"
8533
+ placeholder: placeholder || "__.___.___-_",
8534
+ validate: (value) => {
8535
+ const isEmpty = value.length === 0;
8536
+ if (!required && isEmpty) return true;
8537
+ if (value.length >= 3) return true;
8538
+ return validationErrorMessage;
8539
+ }
8534
8540
  }
8535
8541
  );
8536
8542
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lets-events/react",
3
- "version": "12.1.8",
3
+ "version": "12.1.9",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -21,6 +21,12 @@ export const IdentityDocumentNumberFormField = ({
21
21
  label={label}
22
22
  required={required}
23
23
  placeholder={placeholder || "__.___.___-_"}
24
+ validate={(value: string) => {
25
+ const isEmpty = value.length === 0;
26
+ if (!required && isEmpty) return true;
27
+ if (value.length >= 3) return true;
28
+ return false || validationErrorMessage;
29
+ }}
24
30
  />
25
31
  );
26
32
  };