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

Allow set with initial-validity / refire validators if updated #288

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

codeuniquely
Copy link

@codeuniquely codeuniquely commented Jul 4, 2017

These two small additions fix the issues raised in (Closes, #286) and (Closes, #287)

@DaanDD
Copy link

DaanDD commented Oct 6, 2017

This PR fixes an important issue because empty ng-models were never being validated. Can this be merged?

@hueitan
Copy link
Owner

hueitan commented Oct 9, 2017

Hi @codeuniquely the test is currently failed, do you mind checking and correct it? then I will merge this pr.

thanks @DaanDD for the reminder.

@codeuniquely
Copy link
Author

I have no idea what any of that is going on about, as far as i can tell there is a long list of PhantomJS 2.1.1 messages with numbers of errors in red and a loads of message sin travis Missing Environment all added up thee must be 100's of error lines and in travis there are loads of missing variables for node env and some other stuff ...

I have No idea why - i just added a line to set a value that was missed out before ...

@@ -319,6 +319,9 @@
*/
attrs.$observe('validator', function(value) {
validation = value.split(',');
// validation has been updated => make rule fire again
var theValue = useViewValue ? ctrl.$viewValue : ctrl.$modelValue;
checkValidation(scope, element, attrs, ctrl, validation, theValue);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests fail because the checkValidation will be called in the initialization phase, it should trigger only there is a change on validator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants