分类目录归档:Yii2
GridView::widget(['dataProvider'=>$dataProvider,'filterModel'=>$searchModel,'columns'=>[//['class'=>'yii\grid\SerialColumn'],'extract_id',['attribute'=>'user_type','filter'=>Html::activeDropDownList($searchModel,'user_type',Extract::$userTypes,['class'=>'form-control','prompt'=>'请选择']),...
继续阅读 >
required:必须值验证属性[['字段名'],required,'requiredValue'=>'必填值','message'=>'提示信息'];#说明:CRequiredValidator的别名,确保了特性不为空.email:邮箱验证['email','email'];#说明:CEmailValidator的别名,确保了特性的值是一个有效的电邮地址.match:正则验证[['字段名'],match,'pattern'=>'正则表达式','message'=>'提示信息'];[['字段名'],match,'not'=>ture,'pattern'=>'正则表达式','messa...
继续阅读 >