Skip to content

Commit

Permalink
Merge branch 'dlueth-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sha256 committed Aug 18, 2020
2 parents 496972a + f4bcb6b commit a869bcc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pristine.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function Pristine(form, config, live){

let valid = true;

for(let i in fields){
for(let i = 0; fields[i]; i++) {
let field = fields[i];
if (_validateField(field)){
!silent && _showSuccess(field);
Expand Down Expand Up @@ -159,7 +159,7 @@ export default function Pristine(form, config, live){
function _validateField(field){
let errors = [];
let valid = true;
for(let i in field.validators){
for(let i = 0; field.validators[i]; i++) {
let validator = field.validators[i];
let params = field.params[validator.name] ? field.params[validator.name] : [];
params[0] = field.input.value;
Expand Down Expand Up @@ -279,7 +279,7 @@ export default function Pristine(form, config, live){
* Resets the errors
*/
self.reset = function () {
for(let i in self.fields){
for(let i = 0; self.fields[i]; i++) {
self.fields[i].errorElements = null;
}
Array.from(self.form.querySelectorAll('.' + PRISTINE_ERROR)).map(function (elem) {
Expand Down

0 comments on commit a869bcc

Please sign in to comment.