Skip to content

Commit

Permalink
Fix indentation in test files, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
sha256 committed Aug 19, 2020
1 parent a869bcc commit a4ed329
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 191 deletions.
6 changes: 3 additions & 3 deletions dist/pristine.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@

var valid = true;

for (var i in fields) {
for (var i = 0; fields[i]; i++) {
var field = fields[i];
if (_validateField(field)) {
!silent && _showSuccess(field);
Expand Down Expand Up @@ -226,7 +226,7 @@
function _validateField(field) {
var errors = [];
var valid = true;
for (var i in field.validators) {
for (var i = 0; field.validators[i]; i++) {
var validator = field.validators[i];
var params = field.params[validator.name] ? field.params[validator.name] : [];
params[0] = field.input.value;
Expand Down Expand Up @@ -351,7 +351,7 @@
* Resets the errors
*/
self.reset = function () {
for (var i in self.fields) {
for (var i = 0; self.fields[i]; i++) {
self.fields[i].errorElements = null;
}
Array.from(self.form.querySelectorAll('.' + PRISTINE_ERROR)).map(function (elem) {
Expand Down
2 changes: 1 addition & 1 deletion dist/pristine.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pristinejs",
"version": "0.1.8",
"version": "0.1.9",
"description": "A tiny vanilla javascript form validation library",
"main": "dist/pristine.js",
"scripts": {
Expand Down
Loading

0 comments on commit a4ed329

Please sign in to comment.