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

Commit

Permalink
merged PR #162 and PR #163
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Aug 17, 2017
1 parent e369000 commit c7114fc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 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.22",
"version": "1.5.23",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": [
Expand Down
8 changes: 4 additions & 4 deletions dist/angular-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Angular-Validation Directive and Service (ghiscoding)
* http://github.com/ghiscoding/angular-validation
* @author: Ghislain B.
* @version: 1.5.22
* @version: 1.5.23
* @license: MIT
* @build: Wed Jun 07 2017 22:01:12 GMT-0400 (Eastern Daylight Time)
* @build: Thu Aug 17 2017 00:34:56 GMT-0400 (Eastern Daylight Time)
*/
/**
* Angular-Validation Directive (ghiscoding)
Expand Down Expand Up @@ -617,7 +617,7 @@ angular
self = analyzeElementAttributes(self);

// get the rules(or validation), inside directive it's named (validation), inside service(rules)
var rules = self.validatorAttrs.rules || self.validatorAttrs.validation;
var rules = self.validatorAttrs.rules || self.validatorAttrs.validation || '';

// We first need to see if the validation holds a custom user regex, if it does then deal with it first
// So why deal with it separately? Because a Regex might hold pipe '|' and so we don't want to mix it with our regular validation pipe
Expand Down Expand Up @@ -1255,7 +1255,7 @@ angular
var formName = (!!formObj) ? formObj.getAttribute("name") : null;

if (!!formObj && !!formName) {
parentForm = (!!_globalOptions && !!_globalOptions.controllerAs && formName.indexOf('.') >= 0)
var parentForm = (!!_globalOptions && !!_globalOptions.controllerAs && formName.indexOf('.') >= 0)
? objectFindById(self.scope, formName, '.')
: self.scope[formName];

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.22",
"version": "1.5.23",
"author": "Ghislain B.",
"description": "Angular-Validation Directive and Service (ghiscoding)",
"main": "dist/angular-validation.min",
Expand Down
6 changes: 2 additions & 4 deletions protractor/badInput_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ describe('Angular-Validation badInput Tests:', function () {
it('Should display same invalid character error message even after a Tab', function() {
// make input3 invalid, remove text
var elmInput2 = $('[name=input2]');
element(by.css('body')).click();
elmInput2.sendKeys(protractor.Key.TAB);

// error should appear on input2
Expand Down Expand Up @@ -82,7 +81,7 @@ describe('Angular-Validation badInput Tests:', function () {
});

it('Should hide ValidationSummary after clicking on checkbox', function() {
var btnShowSummary = $('[name=btn_showValidation]');
var btnShowSummary = $('[name=chkbox_validationSummary]');
btnShowSummary.click();
browser.waitForAngular();

Expand All @@ -96,7 +95,6 @@ describe('Angular-Validation badInput Tests:', function () {
var elmInput2 = $('[name=input2]');
elmInput2.click();
clearInput(elmInput2, 5);
element(by.css('body')).click();
elmInput2.sendKeys(protractor.Key.TAB);

// error should appear on input2
Expand All @@ -105,7 +103,7 @@ describe('Angular-Validation badInput Tests:', function () {
});

it('Should show ValidationSummary after clicking on show checkbox', function() {
var btnShowSummary = $('[name=btn_showValidation]');
var btnShowSummary = $('[name=chkbox_validationSummary]');
btnShowSummary.click();
browser.waitForAngular();

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.22`
`Version: 1.5.23`
### Forms Validation with Angular made easy!
##### (Concept comes from the amazing Laravel)

Expand Down

0 comments on commit c7114fc

Please sign in to comment.