Skip to content

Conversation

@sn
Copy link
Member

@sn sn commented Aug 10, 2025

This pull request significantly expands the validator coverage and documentation for the GUMP PHP library, focusing on modern web, security, network, geographic, date/time, mathematical, and content/format validation. It introduces new validator rules, updates documentation to reflect these additions, and provides corresponding error messages and usage examples. The changes also add comprehensive tests for several new validators to ensure correctness.

Documentation and Validator Additions

  • Added 30+ new validators in the README.md, grouped by theme: Security, Modern Web, Network, Geographic, Date/Time, Mathematical, and Content & Format. Each group includes a description and usage examples for new rules such as strong_password, jwt_token, uuid, hex_color, latitude, future_date, prime, camel_case, etc.
  • Updated the validator count in the documentation to "70+ built-in validators" and improved formatting and clarity throughout the README.md. [1] [2]

Error Message Support

  • Added error messages for all new validators in lang/en.php, ensuring user-friendly feedback for validation failures (e.g., for strong_password, jwt_token, hex_color, camel_case, etc.).

Test Coverage for New Validators

  • Added new test cases for camel_case, future_date, hex_color, and jwt_token validators, covering valid and invalid scenarios for each rule. [1] [2] [3] [4]

Usage Examples

  • Expanded real-world usage examples in the documentation, demonstrating how to use the new validators in common scenarios such as security/authentication forms, geographic/network validation, and content/format validation. [1] [2]

General Improvements

  • Improved formatting and organization of validator and filter reference tables in the documentation for better readability. [1] [2]

These changes collectively make GUMP more robust and suitable for modern PHP applications, with clear documentation and reliable validation for a wide range of data types and formats.

@sn sn self-assigned this Aug 10, 2025
@sn sn merged commit 332f48c into master Aug 10, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants