PHPackages                             stankata90/yii2-rules-generator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. stankata90/yii2-rules-generator

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

stankata90/yii2-rules-generator
===============================

The Rules Generator for the Yii framework

v1.0.0(5y ago)0157BSD-3-ClausePHPPHP &gt;=7.2

Since Mar 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/stankata90/yii2-rules-generator)[ Packagist](https://packagist.org/packages/stankata90/yii2-rules-generator)[ RSS](/packages/stankata90-yii2-rules-generator/feed)WikiDiscussions stable Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

yii2-rules-generator
====================

[](#yii2-rules-generator)

[![PHP from Packagist](https://camo.githubusercontent.com/b3250058a6d5b0b4627e25e7ab6039274751a629294a92bdd5371f622f4ef469/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f7374616e6b61746139302f796969322d72756c65732d67656e657261746f723f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stankata90/yii2-rules-generator)[![PHP from Packagist](https://camo.githubusercontent.com/b81d9965f695372ecdd2838d4d3d10aeeb4d9817d30f0008ebc7ea825affa83e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7374616e6b61746139302f796969322d72756c65732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stankata90/yii2-rules-generator)[![Latest Stable Version](https://camo.githubusercontent.com/b1bc5a31f8f67b1ca069fbf779f5cecc1c8d2fdc36afec83440d8f64ef5f08d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7374616e6b61746139302f796969322d72756c65732d67656e657261746f723f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265)](https://packagist.org/packages/stankata90/yii2-rules-generator)[![Total Downloads](https://camo.githubusercontent.com/e3bf5169498010d60f3aa2ad77db74683f8e92ce366501dda777fb3126dc4a39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7374616e6b61746139302f796969322d72756c65732d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stankata90/yii2-rules-generator)

Generate quick and easy arrays for model rules, auto-complete tips for validators and their options.

Highlights
----------

[](#highlights)

- Simple installation
- Simplify things

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

[](#installation)

Install in the usual way with Composer. Add the following to the require section of your composer.json file:

```
"stankata90/yii2-rules-generator": "*"
```

or run

```
composer require stankata90/yii2-rules-generator
```

Documentation
-------------

[](#documentation)

#### Example standard model file:

[](#example-standard-model-file)

```

```

#### Install the Generator in model

[](#install-the--generator-in-model)

To access the generator, you need to use the trait RulesGenerator

```

```

#### Using the generator

[](#using-the-generator)

After using trait, another "rulesGenerator" method is presented in the context of the model. Using this method we will generate arrays with rules for yii2.

```
