icron / yii-dynamic-model
DynamicModel is a model class primarily used to support ad hoc data validation
Installs: 2 374
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 2
Open Issues: 1
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-12-23 02:57:21 UTC
README
DynamicModel is a model class primarily used to support ad hoc data validation. The typical usage of DynamicModel is as follows,
$model = new DynamicModel( ['name', 'email'], [ ['name, email', 'length', 'max' => 50], ] ); if ($model->hasErrors()) { // validation fails } else { // validation succeeds }