What happened?
I'm trying to use global and local rules together like this:
<Field
:rules="{
required: true,
myLocalRule
}"
/>
But I get the error Error: No such validator 'myLocalRule' exists.
However, if I just use it like this:
<Field
:rules="myLocalRule"
/>
It works fine.
I've also tried the array syntax:
<Field
:rules="[
'required',
myLocalRule
]"
/>
But that gives the error TypeError: rule is not a function
This might be related to the discussion here: #4705
and this issue #4058 (which is closed but seems like it's still not working?)
What happened?
I'm trying to use global and local rules together like this:
But I get the error
Error: No such validator 'myLocalRule' exists.However, if I just use it like this:
It works fine.
I've also tried the array syntax:
But that gives the error
TypeError: rule is not a functionThis might be related to the discussion here: #4705
and this issue #4058 (which is closed but seems like it's still not working?)