Skip to content

Commit 95212c2

Browse files
committed
build: turn off console.log
1 parent e596ccf commit 95212c2

5 files changed

+1
-14
lines changed

dist/alpine.validate.cjs.js

-3
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,8 @@ var Plugin = function(Alpine) {
198198
valid = arrayLength >= num;
199199
} else {
200200
valid = field.checkValidity();
201-
console.log("\u{1F680} checkIfValid 0", isRequired, valid, !value, !field.checked, isRequired && (!value || !field.checked));
202201
if (isRequired && (!value || isCheckRadio(field) && !field.checked))
203202
valid = false;
204-
console.log("\u{1F680} checkIfValid 1", valid);
205203
if (valid && value) {
206204
for (let type of validators) {
207205
if (isVarType(validate[type], "function")) {
@@ -219,7 +217,6 @@ var Plugin = function(Alpine) {
219217
valid = false;
220218
}
221219
}
222-
console.log("\u{1F680} checkIfValid 2", valid);
223220
toggleError(field, valid);
224221
updateFormData(field, { value: field.value, valid });
225222
if (!valid && isHtmlElement(field, "input, textarea") && !isClickField(field) && !includes(validators, "bluronly"))

dist/alpine.validate.esm.js

-3
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,8 @@ var Plugin = function(Alpine) {
185185
valid = arrayLength >= num;
186186
} else {
187187
valid = field.checkValidity();
188-
console.log("\u{1F680} checkIfValid 0", isRequired, valid, !value, !field.checked, isRequired && (!value || !field.checked));
189188
if (isRequired && (!value || isCheckRadio(field) && !field.checked))
190189
valid = false;
191-
console.log("\u{1F680} checkIfValid 1", valid);
192190
if (valid && value) {
193191
for (let type of validators) {
194192
if (isVarType(validate[type], "function")) {
@@ -206,7 +204,6 @@ var Plugin = function(Alpine) {
206204
valid = false;
207205
}
208206
}
209-
console.log("\u{1F680} checkIfValid 2", valid);
210207
toggleError(field, valid);
211208
updateFormData(field, { value: field.value, valid });
212209
if (!valid && isHtmlElement(field, "input, textarea") && !isClickField(field) && !includes(validators, "bluronly"))

dist/alpine.validate.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/alpine.validate.min.js

-3
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@
186186
valid = arrayLength >= num;
187187
} else {
188188
valid = field.checkValidity();
189-
console.log("\u{1F680} checkIfValid 0", isRequired, valid, !value, !field.checked, isRequired && (!value || !field.checked));
190189
if (isRequired && (!value || isCheckRadio(field) && !field.checked))
191190
valid = false;
192-
console.log("\u{1F680} checkIfValid 1", valid);
193191
if (valid && value) {
194192
for (let type of validators) {
195193
if (isVarType(validate[type], "function")) {
@@ -207,7 +205,6 @@
207205
valid = false;
208206
}
209207
}
210-
console.log("\u{1F680} checkIfValid 2", valid);
211208
toggleError(field, valid);
212209
updateFormData(field, { value: field.value, valid });
213210
if (!valid && isHtmlElement(field, "input, textarea") && !isClickField(field) && !includes(validators, "bluronly"))

src/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,9 @@ const Plugin = function (Alpine) {
339339
} else {
340340
/* --------------------- Check validity the browser way --------------------- */
341341
valid = field.checkValidity();
342-
console.log('🚀 checkIfValid 0', isRequired, valid, !value, !field.checked, (isRequired && (!value || !field.checked)));
343342
/* -------------------------- Check validity my way ------------------------- */
344343
// if required and empty or not checked then invalid
345344
if (isRequired && (!value || (isCheckRadio(field) && !field.checked))) valid = false
346-
console.log('🚀 checkIfValid 1', valid);
347345
// if valid and has value run it
348346
if (valid && value) {
349347
// only run if valid currently
@@ -367,8 +365,6 @@ const Plugin = function (Alpine) {
367365
}
368366
}
369367

370-
console.log('🚀 checkIfValid 2', valid);
371-
372368
toggleError(field, valid)
373369

374370
/* ----------------------------- Update formData ---------------------------- */

0 commit comments

Comments
 (0)