title: show input errors of active form in an alert box yii2
body: <p>I have a form in my web app which written in php language under yii2 framework.
  now i have designed my own form with custom css and i don't want to show errors under each input.
  I have canceled error showing with <code>fieldconfig</code> in yii2 form.
  But it is a bug for a system that doesn't show error of inputs to the users.
  I want to show errors in another div or in an alert box.
  how should i do this?</p>
  
  <p>here is my form</p>
  
  <pre><code>&lt;?php
                  $form = ActiveForm::begin([
                      'enableClientValidation' =&gt; true,
                      fieldConfig' =&gt; ['template' =&gt; "{label}\n{input}"]
                      ])
                  ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'name')-&gt;textInput(['maxlength' =&gt; true, 'class' =&gt; 'txtbox_name', 'placeholder' =&gt; 'نام'])-&gt;label('') ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'family')-&gt;textInput(['maxlength' =&gt; true, 'class' =&gt; 'txtbox_name', 'placeholder' =&gt; 'نام خانوادگی'])-&gt;label('') ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'email')-&gt;textInput(['maxlength' =&gt; true, 'class' =&gt; 'txtboxpass', 'placeholder' =&gt; 'پست الکترونیک'])-&gt;label('') ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'password')-&gt;passwordInput(['maxlength' =&gt; true, 'class' =&gt; 'txtboxpass', 'placeholder' =&gt; 'رمز عبور'])-&gt;label('') ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'password')-&gt;passwordInput(['maxlength' =&gt; true, 'class' =&gt; 'txtboxpass', 'placeholder' =&gt; 'رمز عبور'])-&gt;label('') ?&gt;
  
                  &lt;?= $form-&gt;field($regModel, 'grade_id')-&gt;dropDownList(\yii\helpers\ArrayHelper::map(\app\models\Grade::find()-&gt;all(), 'id', 'name'), ['prompt' =&gt; 'انتخاب مقطع', 'class' =&gt; 'drglist'])-&gt;label(''); ?&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;?= Html::submitButton('ثبت نام', ['class' =&gt; 'btn_sabt', 'id' =&gt; 'reg']) ?&gt;
                  &lt;/div&gt;        
                  &lt;?php ActiveForm::end(); ?&gt;  
  </code></pre>
  
  <p>please help me it is so necessary/
  thank you</p>