hidden-character-detector
Reactive icon

Hidden Character Detector

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 10 February 2025
 by 
0.0
 (0 ratings)
hidden-character-detector

Hidden Character Detector

Documentation
1.0.0

📌 Overview


Invisible characters and unintended spaces can cause validation issues, inconsistencies, and unexpected behavior in applications. This function detects and removes them before saving the input to the database, ensuring data integrity and reliability.


⚙️ Features


✅ Detects invisible characters (zero-width, non-breaking spaces, Unicode control characters).
✅ Removes unwanted spaces (configurable to include or exclude normal spaces).
✅ Supports full-string or front/back-only cleaning.
Optimized for performance and integration with OutSystems.


🔧 Configuration Parameters


Parameter Type Description
TextToCheck Text  Input string to validate and clean.
IsSpaceIncluded Boolean  True = Remove spaces; False = Ignore spaces.
IsCheckAllString  Boolean True = Check entire text; False = Clean only front and back.
CleanedText Text The sanitized output after processing.


📖 Usage Guide


1️⃣ Basic Usage in Form Validation

  1. Call the function when a user submits a text input.
  2. Pass the user’s input as TextToCheck.
  3. Retrieve CleanedText and store or display it as the validated value.

2️⃣ Example Scenarios

📌 Before Cleaning
🔹 Hello‎ World → (Contains hidden Unicode characters)
🔹 " Text " → (Leading and trailing spaces)

📌 After Cleaning (Configured to Remove Spaces & Hidden Characters)
"Hello World"
"Text"


📢 Best Practices


✔ Use Before Saving: Always clean text before storing in the database.
✔ Combine with Trim(): Further optimize for whitespace removal.
Enable Logging (Optional): Track and monitor invalid input patterns.