Questions tagged [ng-messages]

Use for questions about the AngularJS ng-messages module.

Resources

170 questions
0
votes
1 answer

angularjs - ngMessages and validation not working as expected

I'm adding validation to the user registration page in my app and I'm trying to use ngMessages and the build-in angularjs validation. I'm experiencing strange behaviour for password matching and with patterns in general. Here's the code for password…
Nick
  • 13,493
  • 8
  • 51
  • 98
0
votes
1 answer

Can I trigger ngMessages validation by hand?

I have an input field with a custom validator and ng-messages to show validation messages. The custom validator is simple: ngModel.$validators.phoneNumber =…
Attila Kling
  • 1,717
  • 4
  • 18
  • 32
0
votes
1 answer

Flicker with ngMessages and ngShow

On a form with required-validation and ng-messages I use ng-show to hide the directive on startup and only show error messages after the input got ng-dirty. To still keep the element filling it's space in the layout I have following css rule to…
Aides
  • 3,643
  • 5
  • 23
  • 39
0
votes
2 answers

Getting error while trying to display validation message using Angular.js

i am getting the following error while trying to display the validation message using Angular.js. Error: angularjs.js:107 Error: [$parse:syntax]…
satya
  • 3,508
  • 11
  • 50
  • 130
0
votes
1 answer

ng-messages asyncValidators

I'm trying to write directive to validate if username exists on the server. If it exists I want to show error via ng-messages. But for some reason the error doesn't show.I checked server response and it returns right values but looks like validator…
0
votes
2 answers

Validating dynamic forms using ng-messages

I'm trying to create a bunch of reusable components, which are mainly form controls. For this reason, I believe (Maybe there is a different approach for this?) I need to create dynamic names for the ng-form directive so that it won't overwrite…
T J
  • 42,762
  • 13
  • 83
  • 138
0
votes
1 answer

Need ID of SELECT in ngRepeat but get "Syntax Error: Token '{' invalid key at column ## ""

I'm using ng-repeat to generate a group of selects. It works, mostly. Now I'm trying to set up ngMessages to display errors for a custom directive that checks for duplication selections, and set that SELECT to invalid. However, the ngMessages…
Mr Smith
  • 3,318
  • 9
  • 47
  • 85
0
votes
1 answer

How to show ng-message when submit or lose focus with out exact some button click(cancel button)

I have form on a dialog with some input field and a submit, a cancel buttons. I use ng-message for show input is wrong. But when i click cancel with ng-click="$dismiss()" for disable dialog then ng-message is show and action dismiss() is terminate.…
RuaTre
  • 111
  • 2
  • 8
0
votes
1 answer

How to include Angular ngMessage template

I have quite a big form and was looking at ngMessages. I wanted to implement this: