-
Notifications
You must be signed in to change notification settings - Fork 1.8k
How to validate the select input? #788
Comments
+1 |
+1. I've tried to change the code to also pass select template
uiSelectMatch
|
I recently worked on a small typeahead directive in my own project. This seems to have worked. (Idea taken from https://gist.github.com/mbenford/dd7556f01963f49e5c7d (mbenford)) Implement another directive for binding attributes (sort of a replacement for ngAttr)
Pass it to the select's (or whatever other directive's) isolated scope:
Use it like this in the select input's (or other directive's) template:
My template's input now registers with the form controller correctly and sets up all of the appropriate angular validation properties and methods on itself and the form. One issue maybe for this module -- I can only get this to work with an isolated scope (mapping to attributes on the parent scope). |
+1 |
2 similar comments
+1 |
+1 |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
same problem |
+1 |
1 similar comment
👍 |
Closing as a duplicate of #403 at heart |
I've already spent some time on trying to figure out how to do this without much success:
How can I validate an input to be not empty using the standard angular form validation mechanism?
The text was updated successfully, but these errors were encountered: