PHPackages                             wt-health/laravel-json-schema-request - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. wt-health/laravel-json-schema-request

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

wt-health/laravel-json-schema-request
=====================================

Like FormRequests, but for validating against a json-schema

v3.2.0(3mo ago)154.1k↑28.6%2[1 issues](https://github.com/wt-health/laravel-json-schema-request/issues)MITPHPPHP ^8.3|^8.4

Since Feb 3Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/wt-health/laravel-json-schema-request)[ Packagist](https://packagist.org/packages/wt-health/laravel-json-schema-request)[ Docs](https://github.com/wt-health/laravel-json-schema-request)[ RSS](/packages/wt-health-laravel-json-schema-request/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (9)Used By (0)

JSON Schema Request
===================

[](#json-schema-request)

[![CI Action](https://github.com/wt-health/laravel-json-schema-request/workflows/continuous-integration/badge.svg)](https://github.com/wt-health/laravel-json-schema-request/workflows/continuous-integration)[![Code Coverage](https://camo.githubusercontent.com/503c66d66043f40bcd4556496b3dcd902aa673351cbfe0cea7b3b9f3125e5c5d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f77742d6865616c74682f6c61726176656c2d6a736f6e2d736368656d612d726571756573742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wt-health/laravel-json-schema-request/?branch=main)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ee3352d3f0c2ac38a369c59f930c2d34a0ba2ec3fad17c37b52eceaa6cb1c1f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f77742d6865616c74682f6c61726176656c2d6a736f6e2d736368656d612d726571756573742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wt-health/laravel-json-schema-request/?branch=main)

Laravels [Form Request Validation](https://laravel.com/docs/7.x/validation#form-request-validation) for JSON Schema documents

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

[](#installation)

```
 composer require wt-health/laravel-json-schema-request
```

Usage
-----

[](#usage)

The development experience is identical to Laravel's Form Request Validation, except instead of writing Laravel validation rules, you write a [JSON Schema](https://json-schema.org/).

You can create a new request using the `make:json-request` command

```
artisan make:json-request MyJsonRequest
```

You will now have new request class `App\Http\Requests\MyJsonRequest`, Below you can see a basic example schema.

```
