Closed EmilMoe closed 8 years ago
I think the problem may be with the way we pass the validation-rules
to validatorjs, since Vue expects the prop to be a string and using :validation-rules
makes it an array.
Also the reason the string version doesn't work either is because of the pipe |
character in the regex, which is used for separating rules when not using the array format.
I will change the validation-rules
prop type to accept both String and Array and see if it solves the problem.
Thanks. Do you know when 0.8.9 is going to be released?
Soon, there's only a few things left, mostly documentation. Perhaps next week if I find the time.
v0.8.9 has landed, which should fix the problem if you use an array.
In v1.0, validation has been removed from the components and should be performed externally. The error can be added to the components using the invalid
and error
props.
I'm trying to apply regex validation to a UiTextbox, but it seems I'm missing something out from validatejs' documentation?
I have also tried
:validation-rules
but then it seems to just ignore it completely.TypeError: Cannot read property 'apply' of undefined
What I want is to have a number input, but as it's in danish the decimal separator is not
.
but,
(.
is the thousand separator in danish). I don't know if it's supported in other ways than with this regex - would be really cool though.