Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is initial-validity broken? #257

Closed
rakeshgudipudi opened this issue Oct 30, 2016 · 2 comments
Closed

Is initial-validity broken? #257

rakeshgudipudi opened this issue Oct 30, 2016 · 2 comments
Assignees
Labels

Comments

@rakeshgudipudi
Copy link

I tried adding initial-validity to an input element. But it was always false.
I had a look into the source code and figured it was set from scope. But, i guess it had to be initialized from attrs.

The following fixed it for me.
var initialValidity=attrs.initialValidity;

Let me know if i am on right track or is there a solution without changing source.
Thanks

@rakeshgudipudi rakeshgudipudi changed the title initial-validity broken Is initial-validity broken? Oct 30, 2016
@hueitan hueitan added the bug label Oct 31, 2016
@hueitan
Copy link
Owner

hueitan commented Oct 31, 2016

yes @rakeshgudipudi you are right, it should set as attrs, I don't even remember why we set it as scope 👍

Thanks anyway!!!

@lvarayut Do you have any thought here?

@hueitan
Copy link
Owner

hueitan commented Oct 31, 2016

Finally, it is because we already remove the scope in defining the directive here
https://github.com/huei90/angular-validation/blob/master/src/validator.directive.js#L265

@rakeshgudipudi Do you mind creating a PR for this?

@Nazanin1369 Nazanin1369 self-assigned this Nov 5, 2016
Nazanin1369 added a commit to Nazanin1369/angular-validation that referenced this issue Nov 5, 2016
hueitan pushed a commit that referenced this issue Dec 13, 2016
#257 Fix for initialValidity set up
@hueitan hueitan closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants