question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot call setValidity on undefined

See original GitHub issue

Its still not working for me using … i cannot set it required field

<angucomplete-alt id="ex1"
                                  placeholder="type to search model..."
                                  pause="100"
                                  selected-object="selectedModel"
                                  local-data="allProducts"
                                  search-fields="MarketingName,ModelCode"
                                  title-field="ModelCode,MarketingName"
                                  minlength="2"
                                  input-class="form-control"
                                  field-required="true"
                                  auto-match="true"
                                  input-name="user"
                                  initial-value="updateModel" />

i get this error


TypeError: Cannot read property '$setValidity' of undefined
    at F (http://samsung.dotcomui.local/uk/promotions/js/directives/angucomplete-alt.min.js:2:1775)
    at h (http://samsung.dotcomui.local/uk/promotions/js/directives/angucomplete-alt.min.js:2:8681)
    at http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:20085:44
    at nodeLinkFn (http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:19683:13)
    at http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:19885:13
    at http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:21055:11
    at wrappedCallback (http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:24520:81)
    at wrappedCallback (http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:24520:81)
    at http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:24606:26
    at Scope.$eval (http://samsung.dotcomui.local/uk/promotions/scripts/vendor.63784f53.js:25630:28) <angucomplete-alt id="ex1" placeholder="type to search model..." pause="100" selected-object="selectedModel" local-data="allProducts" search-fields="MarketingName,ModelCode" title-field="ModelCode,MarketingName" minlength="2" input-class="form-control" field-required="true" auto-match="true" input-name="user" initial-value="updateModel" class="ng-isolate-scope">

please help thanks

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
unlimited071commented, Dec 21, 2016

Ok, I’ve figured out my issue and I’m leaving it here for anyone that may need it in the future. In my case I was using a custom template but the template did not set the name for the input. Setting the input’s name property in the template fixed the issue. Link to Plunker

0reactions
unlimited071commented, Dec 20, 2016

I’m also having this issue. I’ve created the following Plunker link that reproduces the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot call setValidity on undefined · Issue #287 - GitHub
Hello, My complete tag is defined like this:
Read more >
TypeError: Cannot read property '$setValidity' of undefined
Well, I've found the problem. We must use an input with ng-messages like this: <input type="hidden" name="retour" ng-model="retour"> ...
Read more >
HTMLObjectElement.setCustomValidity() - Web APIs | MDN
The setCustomValidity() method of the HTMLObjectElement interface sets a custom validity message for the element.
Read more >
ngModel.NgModelController - AngularJS: API
$asyncValidators collections which will call $setValidity automatically. Parameters. Param, Type, Details. validationErrorKey, string. Name of the validator.
Read more >
AngularJS not-in-list validation - Mitch Valenta
Documentation for $setValidity can be found here. ... There is also a second directive called not-in-list-ignore-case, which provides the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found