Allow set with initial-validity / refire validators if updated#288
Allow set with initial-validity / refire validators if updated#288codeuniquely wants to merge 2 commits intohueitan:masterfrom
Conversation
|
This PR fixes an important issue because empty ng-models were never being validated. Can this be merged? |
|
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. |
|
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 ... |
| 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); |
There was a problem hiding this comment.
The tests fail because the checkValidation will be called in the initialization phase, it should trigger only there is a change on validator.
These two small additions fix the issues raised in (Closes, #286) and (Closes, #287)