Q-Input validate() Function not working as expected #9022
Unanswered
MrMarlin
asked this question in
General - Components / Directives / etc
Replies: 1 comment
-
Show code how you are using it, better make a codesandbox |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello fellow coders
I am currently having an issue with the q-input validation function. I have a q-input which gets its
:rules
from a prop. On@input
I have a function which triggers the validation of this field and makes a call to another function if the result of the validation istrue
. My Problem now is, that the result from the built-invalidate()
function is always one validation "behind". Let me explain.I have a rule on the q-input
return value.length >= 3 || 'Input must at least be three characters long.'
set via a prop. In the UI this works as expected and the input is validated correctly. But if I save the result of the q-input'svalidate()
method in theresult
variable and print it after, I get wrong result on the "edge cases".Pseudo output of
console.log(result)
:Does anybody have an idea what I am doing wrong or if this is a bug?
Thanks and all the best
Beta Was this translation helpful? Give feedback.
All reactions