Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Custom directive validation #140

Description

@LennyLip

I have several custom directive , like a

 <multi-select-tree name="category" ng-model="category.selectedCategory[0]" ng-required="true"></multi-select-tree>

so, early, when is set ng-required="true" , angular-validation (don't remeber version) is work ok and

validationService().checkFormValidity($scope.formScope.Form);

return False , when category.selectedCategory[0] is undefined. (
Now, with @Version: 1.4.4 it does not work. checkFormValidity return true, when category.selectedCategory[0] is undefined. (I think it just not test that from.$valid now? I have form.$valid is false, but checkFormValidity return true)

So, i've been tried to set validation="required" into directive (all of custom) and now i get while load script:

angular.js:13424 TypeError: Cannot read property 'toUpperCase' of undefined
    at C.g [as validate] (angular-validation.min.js:10)
    at Array.d (angular-validation.min.js:9)
    at angular.js:26733
    at m.$digest (angular.js:16860)
    at m.$apply (angular.js:17133)
    at g (angular.js:11454)
    at x (angular.js:11652)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions