TypeError: Cannot read property '$valid' of undefined in Angularjs : Hi I am developing web application in Angularjs. I have below form.

    <form name="form2" novalidate><multiselect class="input-xlarge" multiple="true"
    ng-model="selectedCar" options="c.name for c in cars" change="selected()"></multiselect> 
    <input type="file" file-modelsr = "myFileDL" />
    <input type="file" file-modelsr="myFileID" />
    <input type="submit" value="{{ 'NEXT' | translate }}" class="blue-button" ng-click="saveDetail()">

Below is my JS code.

       if ($scope.form2.$valid) {
                    $scope.saveDetail = function () {
                        var fileDL = $scope.myFileDL;
                        var fileID = $scope.myFileID;
                        var uploadUrl = "/fileUpload";
                        fileUpload.uploadFileToUrl(file, uploadUrl);
                    };
                }
                else
                {
                    alert("not valid");
                }
I am getting below error Cannot read property '$valid' of undefined and not able to figure it why i am getting this error. Any help would be appreciated. Thank you.   