Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS - 'Please select an item from the list" - Where is that coming from?

Tags:

angularjs

I am baffled. In my form, via the submit button having the attribute:

ng-disabled="templateForm.$invalid"

and my select being required

I am getting an undesired popup asking "Please Select an Item from the List".

I searched the whole application and as near as I am sure I have no remote references.

Does anyone know where this is coming from and how can I stop/override/disable it?

Thanks.

With Galdo's Help:

  <form id="addForm" ng-submit="doSomething()" name="templateForm" novalidate>

Did the trick.

like image 300
Bye Avatar asked Dec 27 '22 07:12

Bye


1 Answers

Add the novalidate tag to your form like this

<form novalidate>

This will prevent the browser from doing his own validation of the form using the required attribute.

like image 148
Galdo Avatar answered Apr 11 '23 10:04

Galdo