| Package Data | |
|---|---|
| Maintainer Username: | mitni455 | 
| Maintainer Contact: | jabullard@aol.com (Aaron Bullard) | 
| Package Create Date: | 2017-04-27 | 
| Package Last Update: | 2017-04-27 | 
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-27 03:10:50 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 5 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 1 | 
| Total Watchers: | 2 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
Server side form validation using JSON Schema
Example
<?php
namespace App\Http\Requests;
use SchemaRequest\SchemaFormRequest as Request;
class PersonFormRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return '{
            "type": "object",
            "properties": {
                "fname": {"type": "string", "maximum": 5},
                "lname": {"type": "string", "minimum": 5},
                "mname": {"type": "string", "minimum": 5},
                "age": {"type": "integer", "minimum": 21},
                "email": {"type": "string", "format": "email"}
            }
        }';
    }
}