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

Commit

Permalink
Added Validation Summary and Minified scripts
Browse files Browse the repository at this point in the history
- Added validation summary through 2 new and equivalent properties
`$scope.$validationSummary` and `$scope.formName.$validationSummary`. -
Added `bower` and `gulp` support, the Gulp script gives minified files.
  • Loading branch information
ghiscoding committed Mar 21, 2015
1 parent 186872b commit 931d3b0
Show file tree
Hide file tree
Showing 19 changed files with 335 additions and 99 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ $RECYCLE.BIN/
# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
Expand Down
13 changes: 12 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,22 @@ myApp.config(['$compileProvider', '$locationProvider', '$routeProvider', functio

// -- Main Controller for Angular-Validation Directive
// ---------------------------------------------------
myApp.controller('Ctrl', ['$location', '$scope', '$translate', function ($location, $scope, $translate) {
myApp.controller('Ctrl', ['$location', '$route', '$scope', '$timeout', '$translate', function ($location, $route, $scope, $timeout, $translate) {
$scope.switchLanguage = function (key) {
// change the translation language & reload the page for a better handling of the validation translation
// the timeout+reload ensures validation translations had time to re-render
$translate.use(key);
$timeout(function() {
$route.reload();
}, 50);

};
$scope.goto = function ( path ) {
$location.path( path );
};
$scope.showValidationSummary = function () {
$scope.displayValidationSummary = true;
}
}]);


Expand Down Expand Up @@ -86,5 +95,7 @@ myApp.controller('CtrlValidationService', ['$scope', '$translate', 'validationSe
$scope.removeInputValidator = function ( elmName ) {
// remove a single element (string) OR you can also remove multiple elements through an array type .removeValidator(['input2','input3'])
myValidation.removeValidator(elmName);

$scope.enableRemoveInputValidatorButton = false;
};
}]);
16 changes: 11 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "ghiscoding.angular-validation",
"version": "1.3.8",
"version": "1.3.9",
"authors": [
"Ghislain B."
],
"description": "AngularJS Form Validation (Directive / Service)",
"main": [
"locales/validation/en.js",
"locales/validation/fr.js",
"dist/angular-validation-allin1.min.js",
"dist/validation-common.min.js",
"dist/validation-directive.min.js",
"dist/validation-rules.min.js",
"dist/validation-service.min.js",
"src/validation-common.js",
"src/validation-directive.js",
"src/validation-rules.js",
Expand All @@ -23,19 +28,20 @@
"bower_components",
"test",
"tests",
"more-examples",
"more-examples",
"templates",
"vendors"
"vendors",
"README.md"
],
"homepage": "http://github.com/ghiscoding/angular-validation",
"repository": {
"type": "git",
"url": "git://github.com/ghiscoding/angular-validation"
},
"dependencies": {
"angular": ">= 1.2.0",
"angular": ">= 1.2.0",
"angular-route": ">= 1.2.0",
"angular-translate": ">= 2.4.2",
"angular-translate-loader-static-files": ">= 2.4.2"
}
}
}
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ Angular-Validation change logs
1.3.5 (2015-01-26): Throw an error message when user did not provide a name="" property inside the element to validate.
1.3.6 (2015-02-09): Added ng-strict-di for minification, renamed some files and folder lib to /vendors, moved directive into new /src folder for better separation.
1.3.7 (2015-03-08): Complete rewrite (but same functionality) so that I could add an Angular-Validation Service which is similar implementation as the Directive. Also added `debounce` attribute which is an alias to `typingLimit`, validation rules are now defined as an external service for better maintainability and also created a common file for shared functions by both Validation Directive and Service.
1.3.8 (2015-03-15): Added between/min/max conditional validators on all Date types (ISO, EURO_LONG, EURO_SHORT, US_LONG, US_SHORT)
1.3.8 (2015-03-15): Added between/min/max conditional validators on all Date types (ISO, EURO_LONG, EURO_SHORT, US_LONG, US_SHORT)
1.3.9 (2015-03-21): Added validation summary through 2 new and equivalent properties `$scope.$validationSummary` and `$scope.formName.$validationSummary`. Also added `bower` and `gulp` support, the Gulp script gives minified files.
12 changes: 12 additions & 0 deletions dist/angular-validation-allin1.min.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dist/validation-common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/validation-directive.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 931d3b0

Please sign in to comment.