romi45 / yii2-json-validator
A Yii2 extension that provides JSON validation
Installs: 32 012
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 4
Type:yii2-extension
Requires
- yiisoft/yii2: >=2
Requires (Dev)
- phpunit/phpunit: >=6.3
This package is auto-updated.
Last update: 2024-11-27 19:13:16 UTC
README
A Yii2 extension that provides JSON validation
Installation
$ composer require romi45/yii2-json-validator ~1.1
Usage example
<?php namespace app\models; use yii\base\Model; use romi45\yii2jsonvalidator\JsonValidator; class Foo extends Model { public $bar; public function rules() { return [['bar', JsonValidator::class]]; } }
View public properties in class JsonValidator to get info about all available options.