Validating multiple, comma-separated, email addresses always fails #4426
-
What happened?Vue: v2.7.14 I'm currently working on building an email input component within a larger component library for work purposes. For single email addresses, the validation works as expected, and is outputting locally defined error messages when an attempt is made to save when an email address is either missing, or incorrectly formatted. For multiple emails though, things are failing when a correctly formatted set of email addresses is entered (e.g. The component I'm building is structured along the lines of - hopefully I've not redacted something important to the understanding of the use case.
As you should see, I am trying to make use of vee-validate's ability to infer the input type, and have created a filter to remove any My test use of the component looks as follows:
As far as my understanding goes, I don't think I'm falling foul of the warning in the documentation regarding rules and their use on custom components, as the validation is being called directly on a native HTML This leaves me with the manner in which the email rule from
Any pointers would be much appreciated. Reproduction stepsPlease let me know if the description above is inadequate, and I'll try and put a cut down version together. VersionVue.js 2.x and vee-validate 3.x What browsers are you seeing the problem on?
Relevant log outputNone available Demo linkn/a Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey, I moved this to discussions since it is more of a question. The inferred rule behavior only works on native HTML inputs. You can turn on multiple email validation by passing true if I remember correctly.
|
Beta Was this translation helpful? Give feedback.
Hey, I moved this to discussions since it is more of a question.
The inferred rule behavior only works on native HTML inputs. You can turn on multiple email validation by passing true if I remember correctly.
required|email:true