Validate a web form's email, age range, and required fields in a PHP application using chainable one-line rules.
Add input validation to a PHP API endpoint to reject bad data before it reaches your database.
Replace scattered if-checks in a PHP project with readable, testable validation chains.
Respect/Validation is a PHP library that handles input validation, meaning it checks whether data coming into your application meets the rules you have set. If you are building a website or API in PHP and need to verify that a submitted number is within a certain range, or that an email address looks correct, this library does that work for you. The library is designed so that you can chain multiple rules together in a single readable line. For example, you can check that something is a number, that it is positive, and that it falls between 1 and 255, all in one statement. This makes the code easier to read than writing separate if-checks for each condition. It ships with more than 150 built-in validators covering common needs like checking data types, string formats, numeric ranges, and more. Each validator is fully tested by the project team. It also includes tools for handling the error messages that come back when validation fails, so you can give users clear feedback about what went wrong. The project is open source under the MIT license and is distributed through Packagist, which is the standard package registry for PHP projects. It is marked as a standalone component, meaning it can be added to an existing PHP project without requiring a particular framework. Documentation is hosted separately and covers the full list of available validators along with guides on contributing to the project.
← respect on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.