@umituz/react-native-validation 1.4.8 → 1.4.10

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.
Files changed (2) hide show
  1. package/README.md +70 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # @umituz/react-native-validation
2
+
3
+ ## ⚠️ DEPRECATED
4
+
5
+ **This package is deprecated and will no longer receive updates.**
6
+
7
+ ### Migration Guide
8
+
9
+ All validation utilities have been moved to their respective domain packages:
10
+
11
+ #### Image Validation → `@umituz/react-native-image`
12
+ ```typescript
13
+ // OLD (deprecated)
14
+ import { validateImageUri, getFileExtension } from '@umituz/react-native-validation';
15
+
16
+ // NEW
17
+ import { validateImageUri, getFileExtension } from '@umituz/react-native-image';
18
+ ```
19
+
20
+ Available exports from `@umituz/react-native-image`:
21
+ - `validateImageUri`
22
+ - `getImageMimeType`
23
+ - `getFileExtension`
24
+ - `getMimeTypeFromExtension`
25
+ - `getMimeTypeFromDataUrl`
26
+ - `validateImageMimeType`
27
+ - `validateImageExtension`
28
+ - `validateImageDataUrl`
29
+ - `IMAGE_MIME_TYPES`
30
+ - `SUPPORTED_IMAGE_MIME_TYPES`
31
+ - `EXTENSION_TO_MIME_TYPE`
32
+ - `MIME_TYPE_TO_EXTENSION`
33
+
34
+ #### Auth & General Validation → `@umituz/react-native-auth`
35
+ ```typescript
36
+ // OLD (deprecated)
37
+ import { validateEmail, validateRequired, sanitizeEmail } from '@umituz/react-native-validation';
38
+
39
+ // NEW
40
+ import { validateEmail, validateRequired, sanitizeEmail } from '@umituz/react-native-auth';
41
+ ```
42
+
43
+ Available exports from `@umituz/react-native-auth`:
44
+ - **Auth-specific**: `validateEmail`, `validatePasswordForLogin`, `validatePasswordForRegister`, `validatePasswordConfirmation`, `validateDisplayName`
45
+ - **Base validators**: `validateRequired`, `validatePattern`
46
+ - **String validators**: `validateMinLength`, `validateMaxLength`, `validatePhone`
47
+ - **Number validators**: `validateNumberRange`, `validatePositiveNumber`, `validateAge`
48
+ - **Date validators**: `validateDateOfBirth`, `validateDateRange`
49
+ - **Collection validators**: `validateEnum`, `validateTags`
50
+ - **Form helpers**: `batchValidate`
51
+ - **Sanitization**: `sanitizeWhitespace`, `sanitizeEmail`, `sanitizePassword`, `sanitizeName`, `sanitizeText`, `containsDangerousChars`, `isWithinLengthLimit`, `SECURITY_LIMITS`
52
+
53
+ ### Why was this deprecated?
54
+
55
+ This package was over-engineered and mixed concerns from different domains. By moving validation logic to domain-specific packages:
56
+ - **Better separation of concerns**: Image validation belongs with image utilities, auth validation belongs with auth utilities
57
+ - **Reduced dependencies**: Apps only install what they need
58
+ - **Improved maintainability**: Each package owns its validation logic
59
+ - **Clearer API**: Validation functions are now co-located with the features they validate
60
+
61
+ ### Timeline
62
+
63
+ - **Current**: Package still works but shows deprecation warning
64
+ - **Future**: Package will be unpublished after all known consumers have migrated
65
+
66
+ ### Need Help?
67
+
68
+ If you have questions about migration, please open an issue in the respective package repository:
69
+ - Image validation: https://github.com/umituz/react-native-image
70
+ - Auth/general validation: https://github.com/umituz/react-native-auth
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@umituz/react-native-validation",
3
- "version": "1.4.8",
4
- "description": "Comprehensive validation and sanitization utilities for React Native forms",
3
+ "version": "1.4.10",
4
+ "description": "⚠️ DEPRECATED - Use @umituz/react-native-image for image validation or @umituz/react-native-auth for general validation",
5
+ "deprecated": "This package is deprecated. Image validation moved to @umituz/react-native-image, auth/general validation moved to @umituz/react-native-auth. See README for migration guide.",
5
6
  "main": "./src/index.ts",
6
7
  "types": "./src/index.ts",
7
8
  "scripts": {