@egovernments/digit-ui-libraries 1.9.1 → 1.9.3

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/CHANGELOG.md CHANGED
@@ -1,7 +1,54 @@
1
1
  # Changelog
2
2
 
3
- ## [1.9.1] [12-November-2025]
3
+ ## [1.9.3] [15-December-2025]
4
+
5
+ ### 🔧 Validation Pattern Enhancements:
6
+
7
+ #### 📱 Mobile Number Validation Improvements:
8
+ - **Simplified MDMS Pattern Retrieval**: Enhanced `getPattern()` function for mobile number validation
9
+ - Removed verbose console logging for production readiness
10
+ - Streamlined MDMS pattern retrieval logic
11
+ - Silent fallback to default pattern if MDMS not available
12
+ - Better error handling with try-catch for robustness
13
+
14
+ #### ✅ Regex Pattern Fixes:
15
+ - **Name Pattern**: Fixed invalid regex characters in Name validation
16
+ - Old: `/^[^{0-9}^\$\"<>?\\\\~!@#$%^()+={}\[\]*,/_:;""'']{1,50}$/i`
17
+ - New: `/^[^0-9\$\"<>?\\~!@#$%^()+={}\[\]*,/_:;]{1,50}$/i`
18
+ - Removed: `{0-9}` → `0-9`, extra `^`, double escapes `\\\\` → `\\`, smart quotes
19
+
20
+ - **Address Pattern**: Fixed invalid regex characters in Address validation
21
+ - Old: `/^[^\$\"<>?\\\\~\`!@$%^()+={}\[\]*:;""'']{1,500}$/i`
22
+ - New: `/^[^\$\"<>?\\~\`!@$%^()+={}\[\]*:;]{1,500}$/i`
23
+ - Removed: Double escapes and smart quotes that caused regex syntax errors
24
+
25
+ #### 🎯 Technical Improvements:
26
+ - Enhanced pattern matching reliability across all form validations
27
+ - Eliminated browser console regex syntax error warnings
28
+ - Maintained backward compatibility with existing validation logic
29
+ - Improved code maintainability with cleaner regex patterns
30
+
31
+ #### 📋 Modified Files:
32
+ - `packages/libraries/src/utils/index.js`:
33
+ - Simplified `getPattern()` function for MobileNo type
34
+ - Fixed Name pattern regex
35
+ - Fixed Address pattern regex
36
+ - Removed debug console logs
37
+
38
+ ### Impact:
39
+ - Fixes console errors: "Pattern attribute value is not a valid regular expression"
40
+ - Ensures proper form validation across all DIGIT-UI modules
41
+ - Better MDMS integration for mobile number validation
42
+ - Production-ready code without debug logging
43
+
44
+
45
+ ## [1.9.2] [13-November-2025]
46
+ ### Bug fix
47
+ - Fixed the logout redirection issue
48
+ - added back the support for LOGOUT_REDIRECT_URL config
4
49
 
50
+
51
+ ## [1.9.1] [12-November-2025]
5
52
  ### Bug fix
6
53
  - Fixed the logout redirection issue
7
54