PHPackages                             michel/requestkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. michel/requestkit

ActiveLibrary[HTTP &amp; Networking](/categories/http)

michel/requestkit
=================

A lightweight and efficient PHP library for handling, validating, and transforming incoming HTTP requests, supporting both form submissions and JSON API payloads.

1.0.0(8mo ago)011MITPHPPHP &gt;=7.4

Since Dec 15Pushed 8mo agoCompare

[ Source](https://github.com/michelphp/requestkit)[ Packagist](https://packagist.org/packages/michel/requestkit)[ RSS](/packages/michel-requestkit/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Michel PHP requestkit
=====================

[](#michel-php-requestkit)

**Lightweight and efficient PHP library for robust request data validation and transformation.**

Simplify your request processing with `requestkit`. This library allows you to define schemas for your incoming HTTP requests (both form submissions and JSON payloads) and effortlessly validate and transform the data. Ensure data integrity and streamline your application logic with schema-based validation, input sanitization, and flexible transformation methods.

Key Features
------------

[](#key-features)

- **Schema-based validation:** Define clear and concise validation rules for your request data.
- **Data transformation:** Automatically transform and sanitize input data based on your schema.
- **HTTP Header Validation:** Define rules to validate incoming request headers.
- **Form &amp; CSRF Processing:** Securely process form submissions with built-in CSRF token validation.
- **Internationalization (i18n):** Error messages can be easily translated. Comes with English and French built-in.
- **Multiple data types:** Supports strings, integers, booleans, dates, date-times, and numeric types with various constraints.
- **Nested data and collections:** Validate complex data structures, including nested objects and arrays.
- **Error handling:** Provides detailed error messages for easy debugging and user feedback.
- **Extensible:** Easily extend schemas and create reusable validation logic.

Installation
------------

[](#installation)

```
composer require michel/requestkit
```

Basic Usage
-----------

[](#basic-usage)

1. **Create a Schema:** Define your data structure and validation rules using `Schema::create()` and `Type` classes.

```
