PHPackages                             sadovojav/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. sadovojav/laravel-json-schema-request

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

sadovojav/laravel-json-schema-request
=====================================

Like FormRequests, but for validating against a json-schema

1.0.0(5y ago)041MITPHPPHP ^7.4

Since Jun 18Pushed 4y agoCompare

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

READMEChangelogDependencies (4)Versions (5)Used By (0)

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

[](#json-schema-request)

[![CI Action](https://github.com/webtoolsnz/laravel-json-schema-request/workflows/continuous-integration/badge.svg)](https://github.com/webtoolsnz/laravel-json-schema-request/workflows/continuous-integration)[![Code Coverage](https://camo.githubusercontent.com/5bff098b5e9bf234f146818b93747551f6e22cbc329b7970cc3d648984de3a99/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f6c61726176656c2d6a736f6e2d736368656d612d726571756573742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webtoolsnz/laravel-json-schema-request/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5c355b3225c15f16886256637cbc376a82bed9c70a10e1ea4d63a808e71b3ef4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776562746f6f6c736e7a2f6c61726176656c2d6a736f6e2d736368656d612d726571756573742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/webtoolsnz/laravel-json-schema-request/?branch=master)

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

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

[](#installation)

```
 composer require sadovojav/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.

```
