Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-model invalid when multiple="multiple" #8986

Closed
binarykitchen opened this issue Sep 9, 2014 · 5 comments
Closed

ng-model invalid when multiple="multiple" #8986

binarykitchen opened this issue Sep 9, 2014 · 5 comments

Comments

@binarykitchen
Copy link

I have an input field here which allows multiple email addresses

input(name="to",   type="email", data-ng-model="videomail.to", data-ng-change="validate()", data-ng-focus="showDock2To = true", data-ng-blur="showDock2To = false", placeholder="To (recipient email addresses)", required="required", autocomplete="on", multiple="multiple")

but when i enter two email addresses, separated with commas, the angular model holds one email address only. it should leave them untouched.

@Narretz
Copy link
Contributor

Narretz commented Sep 9, 2014

There's currently no support in angular for the multiple attribute.

There's an open issue for it here #6032 and an outdated PR here https://github.com/angular/angular.js/pull/4233/files. You can voice your demand for this in the issue, or even better submit your own PR for it (based on how ngList works)!

@binarykitchen
Copy link
Author

Oh no - I am not confident enough to submit an AngularJS PR. But tell me, how come the PR hasn't been merged yet?

@Narretz
Copy link
Contributor

Narretz commented Sep 9, 2014

The PR didn't get a lot of attention, unfortunately. Looking at it, it should probably also work like ngList: extracting the listed inputs based on a delimiter and putting them into an array.

@binarykitchen
Copy link
Author

Hmm, do you think you could do it? That would be much, much appreciated :)

@Narretz
Copy link
Contributor

Narretz commented Sep 9, 2014

I can't guarantee it. :) I'm gonna close this for now, let's centralize the discussion in #6032

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants