Yii2 models library which used in web-application development.
ActiveRecord model overload parent \yii\db\ActiveRecord
.
This add features:
class AnyModel extends \demmonico\models\ActiveRecord {...}
Model model overload parent \yii\base\Model
.
This add features:
So sanitize rule can inherits by any form.
in model
class AnyForm extends \demmonico\models\Model {...}
in controller use ajax validation
if (!is_null($validate = $model->performAjaxValidation()))
return $validate;
Comments