Skip to content

Commit

Permalink
release v1.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vivin committed Feb 8, 2015
1 parent 0353c3f commit 0548287
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 56 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.idea/
node_modules
dist

2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ module.exports = function (grunt) {

grunt.registerTask('test', ['requirejs:test', 'bgShell:startAsyncTestServer', 'qunit_junit', 'qunit', 'bgShell:stopAsyncTestServer']);
grunt.registerTask('build', ['requirejs:compile', 'requirejs:unoptimized']);
grunt.registerTask('release', ['test', 'build', 'bump']);
grunt.registerTask('release', ['bump', 'test', 'build']);
grunt.registerTask('travis', ['test']);
};
18 changes: 0 additions & 18 deletions dist/regula-1.3.3-min.js

This file was deleted.

65 changes: 31 additions & 34 deletions dist/regula-1.3.3.js → dist/regula-1.3.4.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@

/**
* @preserve
* Regula: An annotation-based form-validation framework in Javascript
* Version 1.3.4
*
* Written By Vivin Paliath (http://vivin.net)
* License: BSD License
* Copyright (C) 2010-2014
*
* Other licenses:
*
* DOMUtils#getElementsByAttribute
* Author: Robert Nyman
* Copyright Robert Nyman, http://www.robertnyman.com
* Free to use if this text is included
*/
/**
* MapUtils contains some convenience functions related to Maps.
* @type {{iterateOverMap: Function, exists: Function, put: Function, isEmpty: Function}}
Expand Down Expand Up @@ -61,7 +76,6 @@
}
};
}));

/**
* DOMUtils contains some convenience functions to look up information in the DOM.
* @type {{friendlyInputNames: {}, getElementsByAttribute: Function, getAttributeValueForElement: Function, supportsHTML5Validation: Function}}
Expand Down Expand Up @@ -170,7 +184,6 @@
};

}));

/**
* Encapsulates logic related to groups.
* @type {{Group: {}, ReverseGroup: {}, deletedGroupIndices: Array, firstCustomGroupIndex: number}}
Expand Down Expand Up @@ -224,7 +237,6 @@
firstCustomGroupIndex: firstCustomGroupIndex
};
}));

/**
* ArrayUtils contains some convenience functions related to arrays.
* @type {{explode: Function}}
Expand Down Expand Up @@ -257,7 +269,6 @@
explode: explode
};
}));

/**
* Defines exceptions that regula throws. Also contains a utility method that makes it easy to generate exception messages.
* @type {{Exception: {}, generateExceptionMessage: Function, explodeParameters: Function}}
Expand Down Expand Up @@ -348,7 +359,6 @@
explodeParameters: explodeParameters
}
}));

/**
* Encapsulates the logic that performs constraint validation.
* The init method needs to be called prior to invoking the validate method or the createPublicValidator method. It's...
Expand Down Expand Up @@ -1131,7 +1141,7 @@
}

function validateElements(options) {
var unboundElements = [];
var elementGroupCount = {};

var constraintsToValidate = {
asyncContexts: [],
Expand All @@ -1145,10 +1155,15 @@
for(var i = 0; i < options.elementIds.length; i++) {

var elementId = options.elementIds[i];
var elementConstraints = groupElements[elementId];
if(typeof elementGroupCount[elementId] === "undefined") {
elementGroupCount[elementId] = 0;
}

var elementConstraints = groupElements[elementId];
if (typeof elementConstraints !== "undefined") {

elementGroupCount[elementId]++;

for (var elementConstraint in elementConstraints) if (elementConstraints.hasOwnProperty(elementConstraint)) {
var context = createConstraintValidationContext(group, elementId, elementConstraint);

Expand All @@ -1158,12 +1173,17 @@
constraintsToValidate.syncContexts.push(context);
}
}
} else {
unboundElements.push(elementId);
}
}
}

var unboundElements = [];
for(var elementId in elementGroupCount) if(elementGroupCount.hasOwnProperty(elementId)) {
if(elementGroupCount[elementId] === 0) {
unboundElements.push(elementId);
}
}

//We want to let the user know if they use an element that does not have any constraints bound to it. Otherwise, this
//function returns zero results, which can be (incorrectly) interpreted as a successful validation
if (unboundElements.length > 0) {
Expand Down Expand Up @@ -2148,7 +2168,6 @@
initializeFromClone: initializeFromClone
};
}));

/**
* Defines the actual constraints that regula supports, and also maintains reverse-mapping between numeric constraint-values
* and their String equivalents (for example, Checked can be mapped to 0, and 0 is reverse-mapped to Checked).
Expand Down Expand Up @@ -3161,7 +3180,6 @@
verifyParameterCountMatches: verifyParameterCountMatches
};
}));

/**
* Contains the logic for the recursive-descent parser that parses constraint-definition strings
* @type {{parse: Function}}
Expand Down Expand Up @@ -4090,7 +4108,6 @@
parse: parse
};
}));

/**
* Contains logic that deals with binding constraints to elements
* @type {{initializeBoundConstraints: Function, resetBoundConstraints: Function, getBoundConstraints: Function,
Expand Down Expand Up @@ -5126,27 +5143,6 @@
isBound: isBound
};
}));

/**
* @preserve
* Regula: An annotation-based form-validation framework in Javascript
* Version 1.3.3-SNAPSHOT
*
* Written By Vivin Paliath (http://vivin.net)
* License: BSD License
* Copyright (C) 2010-2013
*
* Other licenses:
*
* DOMUtils#getElementsByAttribute
* Author: Robert Nyman
* Copyright Robert Nyman, http://www.robertnyman.com
* Free to use if this text is included
*/

// TODO: Add step validation to regula (like html5 step validation)
// TODO: Add URL validation to regula (like html5 url validation)

(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
Expand Down Expand Up @@ -5611,3 +5607,4 @@
Exception: ExceptionService.Exception
};
}));

18 changes: 18 additions & 0 deletions dist/regula-1.3.4.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": "regula",
"version": "1.3.4-SNAPSHOT",
"version": "1.3.4",
"description": "Annotation-based JavaScript Form Validator",
"main": "Gruntfile.js",
"dependencies": {
Expand Down

0 comments on commit 0548287

Please sign in to comment.