We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When doing an ajax validation, i submit an empty form and the input shows an error. with class invalid like this
invalid
class=form-control form-control-lg is-invalid"
when i put a valid integter. it changes to
class=form-control form-control-lg is-valid"
then when i enter an invalid integer again, it doesn't change to is-invalid. It works fine before i used this plugin. Any idea why?
is-invalid
here is my javascript submit
<script> $(document).ready(function () { var $form = $("#<?= $model->formName() ?>"); $form.on("submit", function (event, messages) { event.preventDefault(); $.ajax({ "type":"POST", "url":$form.attr('action'), "data":$form.serialize(), "dataType":"json", "cache": true, "success":function(data){ $("#tax").html(data.rtax); }, "statusCode": { 429: function() { alert("Exceeded request limit."); } } }); return false; }); }); </script>
my form
<?php $form = ActiveForm::begin([ 'id' => $model->formName(), 'enableAjaxValidation' => true, 'enableClientValidation'=> false, 'validateOnBlur' => false, 'validateOnChange' => false, 'options' => ['autocomplete' => 'off'], ]); ?> <?= $form->field($model,'bla', ['template' => ' {label} <div class="input-group mb-3"> {input} <div class="input-group-append"> <span class="input-group-text">%</span> </div> {error} </div> {hint} '])->textInput(['class' => 'form-control form-control-lg']); ?> <?php echo $form->field($model, 'reCaptcha')->widget(\kekaadrenalin\recaptcha3\ReCaptchaWidget::class) ?> <?= Html::submitButton(Module::t('app', 'Calculate'), array('buttonType'=>'submit', 'class' => 'btn btn-lg btn-success btn-block shadow-sm')); ?> <?php ActiveForm::end(); ?>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When doing an ajax validation, i submit an empty form and the input shows an error. with class
invalid
like thisclass=form-control form-control-lg is-invalid"
when i put a valid integter. it changes to
class=form-control form-control-lg is-valid"
then when i enter an invalid integer again, it doesn't change to
is-invalid
. It works fine before i used this plugin. Any idea why?here is my javascript submit
my form
The text was updated successfully, but these errors were encountered: