Inside modal controller I am trying to set up validator like this:
$scope.taskForm.start_date.$setValidity("date", false);
Here is my html:
<input name="start_date" id="startdate" ng-model="modal.project.startDate" type="date" class="form-control" required/>
<!--VALIDATION-->
<span ng-show="taskForm.start_date.date">Something</span>
But this not working, I assume it isbecause modal.
Also I get this error in console:
TypeError: Cannot read property 'start_date' of undefined
EDIT:
Here is example what is problem, just uncomment line from Modal controller and see what is problem in console:
http://jsfiddle.net/9tasz57s/