Getting TypeError when using field rules: value.trim is not a function #3555
Unanswered
DanishOnGit
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Your rule should take into account if (!value || !value.trim()) {
return 'This field is required';
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello folks! I need your help. 🙏
I am getting a Type error when I do field validation for 'text' input type. (I am using Vue3 and vite)
Here is the error:
Here is the field component:
And here is the script:
And here is how I use that component:
Please help guys! I am not getting why this error is occuring.
Also, I tried checking the type of value prop: It is showing as
string
console.log(typeof this.value) // string
Beta Was this translation helpful? Give feedback.
All reactions