3

I'm setting the autocomplete validation md-require-match = true/false based on the radio button selection.

Default validation is md-require-match = true so that user should select an item from autocomplete list. Once it load and user enter some value to the autocomplete input and clear the value, searchForm.autocompleteField.$error have this value: {"md-require-match":true,"required":true}

Now I'm selecting the radio button which is going to set md-require-match = false. But Its not removing md-require-match":true validation error from $error list.

Here is the code pen: http://codepen.io/anon/pen/NbrJoJ

How to fix this validation issue ?

Rookie
  • 429
  • 5
  • 16

1 Answers1

-1

I had the same issue but I used $setValidity('md-require-match', true); on check of the true radio button. Now I am able to set the validity on click of radio button.

Wesley Coetzee
  • 4,768
  • 3
  • 27
  • 45