-
-
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
[yii.activeForm] onBlur - validationDelay freezes #18422
Comments
200 is default validation delay. That was introduced on purpose to give user some time before the validation is triggered. You can adjust it in your form via options: $form = ActiveForm::begin([
'validationDelay' => 1,
]); |
Дело в том, что это не работает. Поэтому я завел такую задачу. |
Alright. Sounds valid. Do you want to do a pull request? |
Yes |
Кстати 0 там тоже не поставить, потому что if 0 ? 0 : 200 = 200 |
What steps will reproduce the problem?
Hello!
When displaying errors, the effect of inhibition occurs.
When the onBlur event occurs for Input.type = "text", the error is displayed not immediately, but by timeout. Input loses focus, the Click event was executed on the mouse, and only an error appears. I removed everything I could from ActiveForm, but it still slows down. I started digging through the code, it turned out that there is such a check:
This code works from here:
In validateAttribute, the fourth parameter is validationDelay, guys, you can fix this and set the fourth parameter to 1. What are these 200ms for?
What is the expected result?
What do you get instead?
The validation text will appear immediately
Additional info
The text was updated successfully, but these errors were encountered: