-
-
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
number field client validation does not work correctly #20075
Comments
Interesting. Do you have time for a pull request with a fix and tests? |
@karelvasicek |
Yes, correct. I've just installed fresh basic app, changed |
What is your model validation rule for the attribute? Validator to which you are pointing is related to model validation rule for |
Yes, I wrote that in my comment. I wrote "...and added a new
Yes, it is. As I wrote, I have
Could be. At least
How did you mean that?
What exactly did work fine for you? |
What steps will reproduce the problem?
Create an active form with
->textInput(['type' => 'number')
withnumber
validation rule created for corresponding attribute. If non-numeric value is entered to the field, client validation passes.What is the expected result?
Validation error shown.
What do you get instead?
Validation passes and no error is shown.
Additional info
It is due to empty value returned by
yii2/framework/assets/yii.activeForm.js
Line 918 in d43341a
yii2/framework/assets/yii.validation.js
Line 120 in d43341a
yii2/framework/assets/yii.activeForm.js
Line 367 in d43341a
The text was updated successfully, but these errors were encountered: