-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
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
enableClientValidation not work on submitting if set enableAjaxValidation to true #14917
Comments
Why 2.0.12 force ajax validation on submitting yii.activeForm.js
|
Is it OK in 2.0.11? |
@samdark 2.0.11 not OK. |
Would be good if you'll find out if there's a version of Yii that is OK. |
@phuczeero Does this behavior only occur if all fields are empty or also if there are wrong values in them? |
@schmunk42 As I mentioned above, enableClientValidation and enableAjaxValidation are set to true, all fields are required, and all supported client validation still work correctly until I hit the submit button, the form skip client validation and send ajax validation request to server. I think it OK in this commit e5bcbf4 |
I see, I was just asking if there is a difference between all inputs empty and one or more wrong values. Could you verify this for debugging without those two rules?
but just
I remember some strange behavior when using validators, which required server-side validation, but I thought it would be project specific. |
I removed |
Change yii.activeForm.js file and it works. From
to
|
I have same Problem . @samdark is it ok? and have not bad effect I upload my project on real host with this change? (until new release 2.0.16 ) |
No idea. I haven't tested it. If you'll find it's good, let us know. |
I use it and change yii.activeForm.js in vendor. it seems work correctly! |
Reproduced, but, I think that is not exactly true. |
@s1lver could you elaborate? |
@machour perhaps I have doubts either in the way of correcting or in reproducing the error. Now I can not remember exactly |
Why don't resolve this bug it in 2.0.16.1 milestone? |
@hooman-pro We don't use milestones for such versions. |
What steps will reproduce the problem?
My model:
My controller action:
My form:
What is the expected result?
Validate all supported client validations before sending ajax validation request
What do you get instead?
Client validation work correctly on input blur, change event, but send ajax request on submitting although all fields are empty.
Additional info
The text was updated successfully, but these errors were encountered: