icron / yii-dynamic-model
DynamicModel is a model class primarily used to support ad hoc data validation
Installs: 2 344
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-10-23 02:35:40 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 }