diff --git a/README.md b/README.md
index 5f2411e..3896f0b 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,9 @@
## 🚀 Overview
-GUMP is a standalone PHP data validation and filtering library that makes validating any data easy and painless without the reliance on a framework. GUMP has been serving the PHP community since **2013** and is trusted by thousands of developers worldwide.
+GUMP is a standalone PHP data validation and filtering library that makes validating any data easy and painless without
+the reliance on a framework. GUMP has been serving the PHP community since **2013** and is trusted by thousands of
+developers worldwide.
### Key Features
@@ -16,7 +18,7 @@ GUMP is a standalone PHP data validation and filtering library that makes valida
- **🌍 19 Languages** - Built-in internationalization support
- **⚡ High Performance** - Lightweight and fast validation processing
- **🔧 Extensible** - Easy to add custom validators and filters
-- **📋 41 Validators** - Comprehensive set of validation rules out of the box
+- **📋 76 Validators** - Comprehensive set of validation rules out of the box
- **🛡️ Security Focused** - Built-in XSS protection and data sanitization
- **🎯 Framework Agnostic** - Works with any PHP project or framework
- **📱 Modern PHP** - Supports PHP 7.1 to 8.4+
@@ -61,11 +63,11 @@ require_once 'path/to/gump.class.php';
- **PHP**: 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4+
- **Extensions**:
- - `ext-mbstring` - Multibyte string support
- - `ext-json` - JSON processing
- - `ext-intl` - Internationalization functions
- - `ext-bcmath` - Arbitrary precision mathematics
- - `ext-iconv` - Character encoding conversion
+ - `ext-mbstring` - Multibyte string support
+ - `ext-json` - JSON processing
+ - `ext-intl` - Internationalization functions
+ - `ext-bcmath` - Arbitrary precision mathematics
+ - `ext-iconv` - Character encoding conversion
## Quick Start
@@ -205,7 +207,7 @@ $is_valid = GUMP::is_valid($data, [
## Available Validators
-GUMP provides **41 built-in validators** for comprehensive data validation:
+GUMP provides **76 built-in validators** for comprehensive data validation:
@@ -254,6 +256,39 @@ GUMP provides **41 built-in validators** for comprehensive data validation:
| **valid_array_size_greater**,1 | Check if an input is an array and if the size is more or equal to a specific value. |
| **valid_array_size_lesser**,1 | Check if an input is an array and if the size is less or equal to a specific value. |
| **valid_array_size_equal**,1 | Check if an input is an array and if the size is equal to a specific value. |
+| **strong_password** | Validate strong password with uppercase, lowercase, number and special character. |
+| **jwt_token** | Validate JWT token format. |
+| **hash**,Array | Validate hash format for specified algorithm. |
+| **no_sql_injection** | Detect common SQL injection patterns. |
+| **no_xss** | Enhanced XSS detection beyond basic sanitize_string. |
+| **uuid** | Validate UUID format (any version). |
+| **base64** | Validate base64 encoded data. |
+| **hex_color** | Validate hexadecimal color code. |
+| **rgb_color** | Validate RGB color format. |
+| **timezone** | Validate timezone identifier. |
+| **language_code** | Validate language code (ISO 639). |
+| **country_code** | Validate country code (ISO 3166). |
+| **currency_code** | Validate currency code (ISO 4217). |
+| **mac_address** | Validate MAC address format. |
+| **domain_name** | Validate domain name format (without protocol). |
+| **port_number** | Validate port number (1-65535). |
+| **social_handle** | Validate social media handle format. |
+| **latitude** | Validate latitude coordinate (-90 to 90). |
+| **longitude** | Validate longitude coordinate (-180 to 180). |
+| **postal_code**,Array | Validate postal code for specified country. |
+| **coordinates** | Validate coordinates in lat,lng format. |
+| **future_date** | Validate that date is in the future. |
+| **past_date** | Validate that date is in the past. |
+| **business_day** | Validate that date falls on a business day (Monday-Friday). |
+| **valid_time** | Validate time format (HH:MM:SS or HH:MM). |
+| **date_range**,2024-01-01;2024-12-31 | Validate date falls within specified range. |
+| **even** | Validate that number is even. |
+| **odd** | Validate that number is odd. |
+| **prime** | Validate that number is prime. |
+| **word_count**,min,10,max,500 | Validate word count within specified range. |
+| **camel_case** | Validate camelCase format. |
+| **snake_case** | Validate snake_case format. |
+| **url_slug** | Validate URL slug format. |
@@ -410,7 +495,7 @@ GUMP includes 15+ filters for data sanitization and transformation:
| **lower_case** | Converts to lowercase. |
| **upper_case** | Converts to uppercase. |
| **slug** | Converts value to url-web-slugs. |
-| **trim** | Remove spaces from the beginning and end of strings (PHP). |
+| **trim** | Remove spaces from the beginning and end of strings. |
### Filter Chaining Example
@@ -497,7 +582,9 @@ GUMP::set_error_messages([
GUMP supports 19 languages out of the box:
-**Supported Languages**: German (de), Greek (el), English (en), Esperanto (eo), Spanish (es), Persian (fa), French (fr), Hebrew (he), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Dutch (nl), Portuguese Brazil (pt-br), Russian (ru), Turkish (tr), Ukrainian (uk), Vietnamese (vi), Chinese Simplified (zh-CN)
+**Supported Languages**: German (de), Greek (el), English (en), Esperanto (eo), Spanish (es), Persian (fa), French (fr),
+Hebrew (he), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Dutch (nl), Portuguese Brazil (pt-br),
+Russian (ru), Turkish (tr), Ukrainian (uk), Vietnamese (vi), Chinese Simplified (zh-CN)
```php
// Set language during instantiation
@@ -700,7 +787,7 @@ We welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING
## Statistics
- ⭐ **GitHub Stars**: 1000+
-- 📦 **Downloads**: 1M+ via Packagist
+- 📦 **Downloads**: 1M+ via Packagist
- 🏭 **Production Use**: Thousands of projects
- 🌍 **Languages**: 19 supported languages
- ⚡ **Performance**: <1ms validation time for typical forms
@@ -709,26 +796,31 @@ We welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING
## Why Choose GUMP?
### ✅ Battle-Tested
+
- **10+ years** in production
- **Trusted** by thousands of developers
- **Proven** in high-traffic applications
### ⚡ Performance First
+
- **Zero dependencies** - no bloat
- **Optimized algorithms** - fast validation
- **Memory efficient** - low resource usage
### 🔒 Security Focused
+
- **XSS protection** built-in
- **Regular security audits**
- **Secure defaults** everywhere
### 🌍 Global Ready
+
- **19 languages** supported
- **UTF-8 compatible**
- **Timezone aware** date validation
### 🛠️ Developer Friendly
+
- **Clean, simple API**
- **Excellent documentation**
- **Extensive examples**
diff --git a/gump.class.php b/gump.class.php
index 52b50f5..4299fe6 100644
--- a/gump.class.php
+++ b/gump.class.php
@@ -3,6 +3,22 @@
use GUMP\ArrayHelpers;
use GUMP\EnvHelpers;
+/**
+ * GUMP - A Fast PHP Data Validation & Filtering Library
+ *
+ * GUMP is a standalone PHP data validation and filtering library that makes validating
+ * any data easy and painless without the reliance on a framework. Supports 41 validators,
+ * 15+ filters, internationalization (19 languages), and custom validators/filters.
+ *
+ * @package GUMP
+ * @version 1.x
+ * @author Sean Nieuwoudt
+ * @copyright 2013-2025 Sean Nieuwoudt
+ * @license MIT
+ * @link https://github.com/wixel/gump
+ *
+ * @since 1.0
+ */
class GUMP
{
/**
@@ -88,8 +104,18 @@ public static function get_instance()
// ** ------------------------- Validation Data ------------------------------- ** //
+ /**
+ * Basic HTML tags allowed in the basic_tags filter.
+ *
+ * @var string
+ */
public static $basic_tags = '