Download the PHP package hesami/laravel-json-validator without Composer
On this page you can find all versions of the php package hesami/laravel-json-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hesami/laravel-json-validator
More information about hesami/laravel-json-validator
Files in hesami/laravel-json-validator
Package laravel-json-validator
Short Description A package for validating JSON data in Laravel
License MIT
Informations about the package laravel-json-validator
Json Validator For Laravel
A package for validating JSON data in Laravel
I developed this package to teach programming concepts to my students in the classroom. But I think it will be useful for you too
I hope I can expand it.😊
If you like to develop it, it will definitely be useful for other programmers, especially beginners.
Requirement
- Laravel 6, 7, 8, 9
- PHP 7.4 , 8
Installation:
How To use:
Rule | Description |
---|---|
json_object |
To check that the input data is a Json string and contains an object |
json_array |
To check that the input data is a Json string and contains an array |
json_object_has_key |
To check that the input is a Json string and contains an array whose items have a key or keys |
json_array_items_has_key |
To check that the input is a Json string and contains an array whose items have a key or keys |
json_array_items_numeric |
Checks that the elements of the array are of numeric type. |
json_array_items_distinct |
To check that the input data is a Json string and contains an distinct array |
json_array_items_count |
To check that the input data is a Json string and contains an array that has a certain number (10 or ...) of objects |
json_array_items_min |
To check that the input data is a Json string and contains an array containing at least $min objects |
json_array_items_max |
To check that the input data is a Json string and contains an array that has at most :max objects |
To check that the input data is a Json string and contains an object:
To check that the input data is a Json string and contains an array:
To check that the input data is a Json string and contains an object that has a key or keys:
To check that the input is a Json string and contains an array whose items have a key or keys:
Checks that the elements of the array are of numeric type:
To check that the input data is a Json string and contains an distinct array:
To check that the input data is a Json string and contains an array that has a certain number (10 or ...) of objects:
To check that the input data is a Json string and contains an array containing at least $min objects:
To check that the input data is a Json string and contains an array that has at most :max objects:
Attention:
To customize the text of the messages in this version, you need to manually write the message validation language in the file.
License
The MIT license (MIT).