Replies: 1 comment
-
Hi, I would suggest this solution: |
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
-
Hi, I want to ask if it is possible to validate using a model value instead of a formatted value when not just focusing on the input element?
I have rules in component as follows
:rules="[(val) => val > 0 || 'Must be greater than 0']"
but when not focus on the element, it gets validated because the value passed to the rules is a formatted value

my current solution is make rules checking the value if contains a comma
:rules="[(val) => val.includes(',') ? true : val > 0 || 'Must greater than 0' ]"
is there a better solution, if the rules will be different later ?
this is my repro
codesandbox
Beta Was this translation helpful? Give feedback.
All reactions