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

Commit

Permalink
issue #139 isValidationCancelled tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 29, 2016
1 parent 2429871 commit 8ac3365
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.5.12",
"version": "1.5.13",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": [
Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Angular-Validation change logs

1.5.13 (2016-12-29) Make sure element exist before looking for `isValidationCancelled`, issue #139
1.5.12 (2016-12-15) Fix a small issue introduced by last commit (Angular Form overwritten with simple object in some rare occasions).
1.5.11 (2016-12-15) Fix checkFormValidity with formName argument, issues #135 #139 #140 #141
1.5.10 (2016-12-13) Fix UI Router issue by adding a UI Router watch on $stateChangeStart, issue #137
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-validation.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-ghiscoding",
"version": "1.5.12",
"version": "1.5.13",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": "dist/angular-validation.min",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Angular Validation (Directive / Service)
`Version: 1.5.12`
`Version: 1.5.13`
### Forms Validation with Angular made easy!
##### (Concept comes from the amazing Laravel)

Expand Down
8 changes: 4 additions & 4 deletions src/validation-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
scope.$on('angularValidation.revalidate', function(event, args){
if (args == ctrl.$name)
{
ctrl.revalidateCalled = true;
var value = ctrl.$modelValue;
ctrl.revalidateCalled = true;
var value = ctrl.$modelValue;

if (!elm.isValidationCancelled) {
if (!!elm && elm.hasOwnProperty("isValidationCancelled")) {
// attempt to validate & run validation callback if user requested it
var validationPromise = attemptToValidate(value);
if(!!_validationCallback) {
Expand Down Expand Up @@ -266,7 +266,7 @@
var formElmObj = commonObj.getFormElementByName(ctrl.$name);
var value = (typeof ctrl.$modelValue !== "undefined") ? ctrl.$modelValue : event.target.value;

if (!formElmObj.isValidationCancelled) {
if (!!formElmObj && formElmObj.hasOwnProperty("isValidationCancelled")) {
// attempt to validate & run validation callback if user requested it
var validationPromise = attemptToValidate(value, 0);
if(!!_validationCallback) {
Expand Down

0 comments on commit 8ac3365

Please sign in to comment.