Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: this.validator.input[req] was changed to req, #451

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions dist/validator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! validatorjs - 2020-12-03 */
/*! validatorjs - 2022-07-04 */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Validator = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
function AsyncResolvers(onFailedOne, onResolvedAll) {
this.onResolvedAll = onResolvedAll;
Expand Down Expand Up @@ -1066,14 +1066,14 @@ var rules = {
},

after: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() < new Date(val2).getTime()) {
Expand All @@ -1084,14 +1084,14 @@ var rules = {
},

after_or_equal: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() <= new Date(val2).getTime()) {
Expand All @@ -1102,14 +1102,14 @@ var rules = {
},

before: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() > new Date(val2).getTime()) {
Expand All @@ -1120,14 +1120,14 @@ var rules = {
},

before_or_equal: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() >= new Date(val2).getTime()) {
Expand Down
12 changes: 3 additions & 9 deletions package-lock.json

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

24 changes: 12 additions & 12 deletions src/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,14 @@ var rules = {
},

after: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() < new Date(val2).getTime()) {
Expand All @@ -432,14 +432,14 @@ var rules = {
},

after_or_equal: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() <= new Date(val2).getTime()) {
Expand All @@ -450,14 +450,14 @@ var rules = {
},

before: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() > new Date(val2).getTime()) {
Expand All @@ -468,14 +468,14 @@ var rules = {
},

before_or_equal: function (val, req) {
var val1 = this.validator.input[req];
var val1 = req;
var val2 = val;

if (!isValidDate(val1)) {
return false;
return true;
}
if (!isValidDate(val2)) {
return false;
return true;
}

if (new Date(val1).getTime() >= new Date(val2).getTime()) {
Expand Down