diff --git a/docs/page/404.html b/docs/page/404.html index 3765fb6..362134a 100644 --- a/docs/page/404.html +++ b/docs/page/404.html @@ -1 +1 @@ -404: This page could not be found.Multiform Validator

Multiform validator

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.Multiform Validator

Multiform validator

404

This page could not be found.

\ No newline at end of file diff --git a/docs/page/_next/static/hQ2Ln4qODzW9xlWqU5b-m/_buildManifest.js b/docs/page/_next/static/Mm8wtyweDSqm_zxtXicLh/_buildManifest.js similarity index 100% rename from docs/page/_next/static/hQ2Ln4qODzW9xlWqU5b-m/_buildManifest.js rename to docs/page/_next/static/Mm8wtyweDSqm_zxtXicLh/_buildManifest.js diff --git a/docs/page/_next/static/hQ2Ln4qODzW9xlWqU5b-m/_ssgManifest.js b/docs/page/_next/static/Mm8wtyweDSqm_zxtXicLh/_ssgManifest.js similarity index 100% rename from docs/page/_next/static/hQ2Ln4qODzW9xlWqU5b-m/_ssgManifest.js rename to docs/page/_next/static/Mm8wtyweDSqm_zxtXicLh/_ssgManifest.js diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-4fa3f9a15df90666.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-13f8a19dcacd3247.js similarity index 56% rename from docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-4fa3f9a15df90666.js rename to docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-13f8a19dcacd3247.js index 66f611a..feb563d 100644 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-4fa3f9a15df90666.js +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-13f8a19dcacd3247.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6494,8080,7226,7762,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-4cfd7b116bdd6c4c.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-4cfd7b116bdd6c4c.js new file mode 100644 index 0000000..b36afc2 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-4cfd7b116bdd6c4c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8080,6494,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-b561c57dc82f8c33.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-b561c57dc82f8c33.js deleted file mode 100644 index 0cc8864..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-b561c57dc82f8c33.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-18e5f1729aaa50f0.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-18e5f1729aaa50f0.js new file mode 100644 index 0000000..d58f50c --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-18e5f1729aaa50f0.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7226,6494,8080,4465,9714,4649,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-e052e01a5b437628.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-e052e01a5b437628.js deleted file mode 100644 index afcbb6d..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-e052e01a5b437628.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7226,8080,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-41d2e137e9fa92c9.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-41d2e137e9fa92c9.js deleted file mode 100644 index c2bdcad..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-41d2e137e9fa92c9.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4649,8080,7226,7762,6494,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-de82b82d78cae53f.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-de82b82d78cae53f.js new file mode 100644 index 0000000..48af364 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-de82b82d78cae53f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4649,6494,8080,4465,9714,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-7c8512bdbab8c44f.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-7c8512bdbab8c44f.js deleted file mode 100644 index dd120de..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-7c8512bdbab8c44f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9714,8080,7226,7762,6494,4649,1706,4465,1637,9852,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-8d62f3afa4390b19.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-8d62f3afa4390b19.js new file mode 100644 index 0000000..dd5e582 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-8d62f3afa4390b19.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9714,6494,8080,4465,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-187969de1c7f279c.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-187969de1c7f279c.js deleted file mode 100644 index 0aab77f..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-187969de1c7f279c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7762,8080,7226,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-1944ec5857576938.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-1944ec5857576938.js new file mode 100644 index 0000000..51f1008 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-1944ec5857576938.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7762,6494,8080,4465,9714,4649,7226,1637,1706,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-1b5946dd2af0fd6f.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-1b5946dd2af0fd6f.js new file mode 100644 index 0000000..bcb19bc --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-1b5946dd2af0fd6f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1706,6494,8080,4465,9714,4649,7226,1637,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-d9e6b59df33a0429.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-d9e6b59df33a0429.js deleted file mode 100644 index d73af9d..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-d9e6b59df33a0429.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1706,8080,7226,7762,6494,4649,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-1808abf5c48fa185.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-1808abf5c48fa185.js deleted file mode 100644 index eca6429..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-1808abf5c48fa185.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465,8080,7226,7762,6494,4649,1706,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-c7c035359963b71f.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-c7c035359963b71f.js new file mode 100644 index 0000000..3aa9163 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-c7c035359963b71f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465,6494,8080,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-5a92c9dd4bfc12ee.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-5a92c9dd4bfc12ee.js deleted file mode 100644 index 851b703..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-5a92c9dd4bfc12ee.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8248,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-9f17668275456452.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-9f17668275456452.js new file mode 100644 index 0000000..4913088 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-9f17668275456452.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8248,6494,8080,4465,9714,4649,7226,1637,1706,7762,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-78a2d8c27bd684ce.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-78a2d8c27bd684ce.js deleted file mode 100644 index e862b1c..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-78a2d8c27bd684ce.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1637,8080,7226,7762,6494,4649,1706,4465,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-baa685b8ca0bec7f.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-baa685b8ca0bec7f.js new file mode 100644 index 0000000..4a35b27 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-baa685b8ca0bec7f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1637,6494,8080,4465,9714,4649,7226,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-11f47af6ae8278ff.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-11f47af6ae8278ff.js new file mode 100644 index 0000000..e2b539f --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-11f47af6ae8278ff.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3956,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-d9c434617df59242.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-d9c434617df59242.js deleted file mode 100644 index d2fa9cf..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-d9c434617df59242.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3956,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-1bcc12224bf12bdd.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-1bcc12224bf12bdd.js new file mode 100644 index 0000000..1949855 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-1bcc12224bf12bdd.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9852,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-716d21fb6fcd90ed.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-716d21fb6fcd90ed.js deleted file mode 100644 index 8476060..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-716d21fb6fcd90ed.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9852,8080,7226,7762,6494,4649,1706,4465,1637,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-2909f27883115289.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-2909f27883115289.js deleted file mode 100644 index e25b957..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-2909f27883115289.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7099,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-5431f7f7d003c7eb.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-5431f7f7d003c7eb.js new file mode 100644 index 0000000..6f36bbf --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-5431f7f7d003c7eb.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7099,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-8c5ea3a4cbff9a68.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-8c5ea3a4cbff9a68.js new file mode 100644 index 0000000..70900e3 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-8c5ea3a4cbff9a68.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2739,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-9460629b3c87adf4.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-9460629b3c87adf4.js deleted file mode 100644 index acc92b0..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-9460629b3c87adf4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2739,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-551e4c64ae0936a2.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-551e4c64ae0936a2.js new file mode 100644 index 0000000..512d3ce --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-551e4c64ae0936a2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6526,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-95af2c9b7b9b3c64.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-95af2c9b7b9b3c64.js deleted file mode 100644 index 425b9fd..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-95af2c9b7b9b3c64.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6526,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-7df12cb76abe1db1.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-7df12cb76abe1db1.js deleted file mode 100644 index cb4ee7d..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-7df12cb76abe1db1.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4653,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-b110b25710550e59.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-b110b25710550e59.js new file mode 100644 index 0000000..2bfe672 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-b110b25710550e59.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4653,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-82211b32481000d4.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-82211b32481000d4.js deleted file mode 100644 index bce2545..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-82211b32481000d4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8230,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-908653a54fa3c7ae.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-908653a54fa3c7ae.js new file mode 100644 index 0000000..2dd349d --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-908653a54fa3c7ae.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8230,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-8633e5b3237090b7.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-8633e5b3237090b7.js new file mode 100644 index 0000000..73b6d26 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-8633e5b3237090b7.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8685,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-a054e8d21eabac0d.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-a054e8d21eabac0d.js deleted file mode 100644 index 0e3ef4e..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-a054e8d21eabac0d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8685,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-a37f33ab8af11f0c.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-a37f33ab8af11f0c.js deleted file mode 100644 index 7923f1f..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-a37f33ab8af11f0c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7357,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-d57eb01d47e4b9ac.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-d57eb01d47e4b9ac.js new file mode 100644 index 0000000..a8c1e59 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-d57eb01d47e4b9ac.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7357,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-53d006cdbdc0470b.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-53d006cdbdc0470b.js new file mode 100644 index 0000000..4350b9f --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-53d006cdbdc0470b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3981,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-5566a06d06dad928.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-5566a06d06dad928.js deleted file mode 100644 index 5175653..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-5566a06d06dad928.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3981,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-6539535225ae961b.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-6539535225ae961b.js deleted file mode 100644 index 69b3847..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-6539535225ae961b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4885,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-9b77b98965d1a31e.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-9b77b98965d1a31e.js new file mode 100644 index 0000000..61a982b --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-9b77b98965d1a31e.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4885,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bb6447d6e13aaeae.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bb6447d6e13aaeae.js deleted file mode 100644 index 4c26e2d..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bb6447d6e13aaeae.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bd7d356bc3eec3b5.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bd7d356bc3eec3b5.js new file mode 100644 index 0000000..c643ab0 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bd7d356bc3eec3b5.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-6ebb71237e2b6513.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-6ebb71237e2b6513.js deleted file mode 100644 index 1b6b51e..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-6ebb71237e2b6513.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6988,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-fe8d754247164146.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-fe8d754247164146.js new file mode 100644 index 0000000..a93cd7d --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-fe8d754247164146.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6988,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-7895a442711bb842.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-7895a442711bb842.js new file mode 100644 index 0000000..79d19df --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-7895a442711bb842.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6538,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,2989,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-8bfcc5d3793d54c8.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-8bfcc5d3793d54c8.js deleted file mode 100644 index 500c29e..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-8bfcc5d3793d54c8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6538,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-4c27e616a43ee7c4.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-4c27e616a43ee7c4.js deleted file mode 100644 index e6cbcf9..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-4c27e616a43ee7c4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[488,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-ece0eb53256826b6.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-ece0eb53256826b6.js new file mode 100644 index 0000000..a4171e4 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-ece0eb53256826b6.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[488,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-06939b7265a40f50.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-06939b7265a40f50.js new file mode 100644 index 0000000..9990d6a --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-06939b7265a40f50.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2819,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-8dc10e865712b198.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-8dc10e865712b198.js deleted file mode 100644 index 22345e3..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-8dc10e865712b198.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2819,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-6560e5875a720af1.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-6560e5875a720af1.js deleted file mode 100644 index 75164ea..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-6560e5875a720af1.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8958,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-7abdeae3f2bda9e8.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-7abdeae3f2bda9e8.js new file mode 100644 index 0000000..abc6547 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-7abdeae3f2bda9e8.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8958,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-313b029056165a0e.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-313b029056165a0e.js deleted file mode 100644 index fad50f3..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-313b029056165a0e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5845,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,6538,488,6988,6200,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-9679db26a6e9220c.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-9679db26a6e9220c.js new file mode 100644 index 0000000..da08334 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-9679db26a6e9220c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5845,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-315f6ade253e27cc.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-315f6ade253e27cc.js deleted file mode 100644 index 6cb4ad9..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-315f6ade253e27cc.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2989,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-8a1cc0bdb269792d.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-8a1cc0bdb269792d.js new file mode 100644 index 0000000..25c2413 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-8a1cc0bdb269792d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2989,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,488,6988,6200,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-15cf292c959a315a.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-15cf292c959a315a.js deleted file mode 100644 index f69e92b..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-15cf292c959a315a.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6200,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,2819,8958,697,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-5f8e23aa38c72a30.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-5f8e23aa38c72a30.js new file mode 100644 index 0000000..3bd5712 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-5f8e23aa38c72a30.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6200,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,5845,697,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-7d512d42c9360722.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-7d512d42c9360722.js deleted file mode 100644 index 598690d..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-7d512d42c9360722.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[697,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,7759,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-f8077fc83b19e1ad.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-f8077fc83b19e1ad.js new file mode 100644 index 0000000..db1fa67 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-f8077fc83b19e1ad.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[697,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,2819,8958,7759,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-1cd06cd02bdba35b.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-1cd06cd02bdba35b.js deleted file mode 100644 index 0e1520a..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-1cd06cd02bdba35b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3635,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,7759,2989],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-35957ed8c75d1512.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-35957ed8c75d1512.js new file mode 100644 index 0000000..ab91f48 --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-35957ed8c75d1512.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3635,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,7759],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-4db27d24a9ab8990.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-4db27d24a9ab8990.js deleted file mode 100644 index 6faf339..0000000 --- a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-4db27d24a9ab8990.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7759,8080,7226,7762,6494,4649,1706,4465,1637,9852,9714,8248,7099,2739,3956,6526,8685,4653,3981,7357,5236,4885,8230,5845,6538,488,6988,6200,2819,8958,697,2989,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-556ec8e586a34161.js b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-556ec8e586a34161.js new file mode 100644 index 0000000..7545cbe --- /dev/null +++ b/docs/page/_next/static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-556ec8e586a34161.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7759,6494,8080,4465,9714,4649,7226,1637,1706,7762,8248,3956,7099,9852,6526,2739,8230,4653,8685,7357,3981,5236,4885,6538,2989,488,6988,6200,5845,697,2819,8958,3635],{251:function(n,e,i){Promise.resolve().then(i.bind(i,5476)),Promise.resolve().then(i.t.bind(i,1356,23))},1356:function(){}},function(n){n.O(0,[3757,7259,231,5,2971,7023,1744],function(){return n(n.s=251)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/about/page-8e6ec80357275236.js b/docs/page/_next/static/chunks/app/about/page-e69d858f9527f39b.js similarity index 74% rename from docs/page/_next/static/chunks/app/about/page-8e6ec80357275236.js rename to docs/page/_next/static/chunks/app/about/page-e69d858f9527f39b.js index 49a0ed7..ea5a56e 100644 --- a/docs/page/_next/static/chunks/app/about/page-8e6ec80357275236.js +++ b/docs/page/_next/static/chunks/app/about/page-e69d858f9527f39b.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7301,5945,5571,8611],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7301,5945,8611,5571],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/info/page-00cdb9268cd6751b.js b/docs/page/_next/static/chunks/app/info/page-8114e533fe21131f.js similarity index 74% rename from docs/page/_next/static/chunks/app/info/page-00cdb9268cd6751b.js rename to docs/page/_next/static/chunks/app/info/page-8114e533fe21131f.js index eb37269..98758b9 100644 --- a/docs/page/_next/static/chunks/app/info/page-00cdb9268cd6751b.js +++ b/docs/page/_next/static/chunks/app/info/page-8114e533fe21131f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5945,7301,5571,8611],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5945,7301,8611,5571],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/privacity-polices/page-24fd46fab729c4c4.js b/docs/page/_next/static/chunks/app/privacity-polices/page-24fd46fab729c4c4.js deleted file mode 100644 index 3477cc5..0000000 --- a/docs/page/_next/static/chunks/app/privacity-polices/page-24fd46fab729c4c4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8611,7301,5945,5571],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/privacity-polices/page-e7502c0c7daf8ac4.js b/docs/page/_next/static/chunks/app/privacity-polices/page-e7502c0c7daf8ac4.js new file mode 100644 index 0000000..81c573c --- /dev/null +++ b/docs/page/_next/static/chunks/app/privacity-polices/page-e7502c0c7daf8ac4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8611,5945,7301,5571],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/terms/page-1d65d7da5d5ebfd1.js b/docs/page/_next/static/chunks/app/terms/page-1d65d7da5d5ebfd1.js new file mode 100644 index 0000000..6c0440a --- /dev/null +++ b/docs/page/_next/static/chunks/app/terms/page-1d65d7da5d5ebfd1.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5571,5945,7301,8611],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/_next/static/chunks/app/terms/page-6a7e184155f492ac.js b/docs/page/_next/static/chunks/app/terms/page-6a7e184155f492ac.js deleted file mode 100644 index edca4f2..0000000 --- a/docs/page/_next/static/chunks/app/terms/page-6a7e184155f492ac.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5571,7301,5945,8611],{8879:function(n,e,u){Promise.resolve().then(u.t.bind(u,8532,23))},8532:function(){}},function(n){n.O(0,[7170,2971,7023,1744],function(){return n(n.s=8879)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/docs/page/about.html b/docs/page/about.html index f897128..2dd6ed5 100644 --- a/docs/page/about.html +++ b/docs/page/about.html @@ -1 +1 @@ -Multiform Validator

Multiform validator

Hello, I'm Gabriel Logan

I consider myself a versatile programmer with a passion for both front-end and back-end development. Crafting exceptional web experiences is what drives me, and I take immense pride in the work I produce.

As a front-end developer, I have a keen eye for user experience and interface design. I love transforming creative concepts into visually captivating and interactive web applications using HTML, CSS, and JavaScript. From seamless navigation to smooth animations, I pay attention to every detail to ensure that my front-end projects exude elegance and functionality.

But my skills don't stop there. I am equally proficient in back-end development, with expertise in languages such as Python, Ruby, and JavaScript (Node.js). Building robust and secure web applications is my forte, as I understand the intricacies of server-side logic. My solutions are geared towards efficiency, reliability, and scalability, making sure that even during peak times, my applications deliver a smooth user experience.

One of my proudest achievements is the creation of a groundbreaking web page that simplifies and speeds up form validation. This ingenious solution is designed to help people and businesses streamline their form validation process. By leveraging my extensive knowledge of web development and incorporating cutting-edge technologies, my page offers a lightning-fast and SUPER efficient way to validate forms. Its user-friendly interface and intuitive functionalities make it an indispensable tool for professionals seeking to enhance their productivity and accuracy in data collection.

Apart from my technical skills, I thrive as a creative problem solver. I love tackling challenges with an innovative mindset and am always on the lookout for ways to enhance the user experience. My ability to think outside the box and deliver inventive solutions sets me apart as a true leader in the field of web development.

When I'm not engrossed in code, you might find me seeking inspiration in the world around me. Whether I'm exploring the outdoors, immersing myself in art and culture, or engaging in thought-provoking discussions, I draw from a diverse range of experiences that shape my approach to programming and my interactions with colleagues and clients.

In conclusion, I am Gabriel Logan, a passionate programmer who seamlessly weaves front-end and back-end skills to create exceptional web experiences. My innovative mindset, attention to detail, and dedication to efficiency have led me to develop a groundbreaking page that I believe will make a significant impact on the world of form validation. As the digital landscape continues to evolve, I stand at the forefront, ready to embrace new challenges and make a difference through my exceptional work in web development.

\ No newline at end of file +Multiform Validator

Multiform validator

Hello, I'm Gabriel Logan

I consider myself a versatile programmer with a passion for both front-end and back-end development. Crafting exceptional web experiences is what drives me, and I take immense pride in the work I produce.

As a front-end developer, I have a keen eye for user experience and interface design. I love transforming creative concepts into visually captivating and interactive web applications using HTML, CSS, and JavaScript. From seamless navigation to smooth animations, I pay attention to every detail to ensure that my front-end projects exude elegance and functionality.

But my skills don't stop there. I am equally proficient in back-end development, with expertise in languages such as Python, Ruby, and JavaScript (Node.js). Building robust and secure web applications is my forte, as I understand the intricacies of server-side logic. My solutions are geared towards efficiency, reliability, and scalability, making sure that even during peak times, my applications deliver a smooth user experience.

One of my proudest achievements is the creation of a groundbreaking web page that simplifies and speeds up form validation. This ingenious solution is designed to help people and businesses streamline their form validation process. By leveraging my extensive knowledge of web development and incorporating cutting-edge technologies, my page offers a lightning-fast and SUPER efficient way to validate forms. Its user-friendly interface and intuitive functionalities make it an indispensable tool for professionals seeking to enhance their productivity and accuracy in data collection.

Apart from my technical skills, I thrive as a creative problem solver. I love tackling challenges with an innovative mindset and am always on the lookout for ways to enhance the user experience. My ability to think outside the box and deliver inventive solutions sets me apart as a true leader in the field of web development.

When I'm not engrossed in code, you might find me seeking inspiration in the world around me. Whether I'm exploring the outdoors, immersing myself in art and culture, or engaging in thought-provoking discussions, I draw from a diverse range of experiences that shape my approach to programming and my interactions with colleagues and clients.

In conclusion, I am Gabriel Logan, a passionate programmer who seamlessly weaves front-end and back-end skills to create exceptional web experiences. My innovative mindset, attention to detail, and dedication to efficiency have led me to develop a groundbreaking page that I believe will make a significant impact on the world of form validation. As the digital landscape continues to evolve, I stand at the forefront, ready to embrace new challenges and make a difference through my exceptional work in web development.

\ No newline at end of file diff --git a/docs/page/about.txt b/docs/page/about.txt index 912437c..9813a90 100644 --- a/docs/page/about.txt +++ b/docs/page/about.txt @@ -2,6 +2,6 @@ 3:I[1343,[],""] 4:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] 5:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["about",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["about",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Hello, I'm Gabriel Logan"}],["$","p",null,{"children":"I consider myself a versatile programmer with a passion for both front-end and back-end development. Crafting exceptional web experiences is what drives me, and I take immense pride in the work I produce."}],["$","p",null,{"children":"As a front-end developer, I have a keen eye for user experience and interface design. I love transforming creative concepts into visually captivating and interactive web applications using HTML, CSS, and JavaScript. From seamless navigation to smooth animations, I pay attention to every detail to ensure that my front-end projects exude elegance and functionality."}],["$","p",null,{"children":"But my skills don't stop there. I am equally proficient in back-end development, with expertise in languages such as Python, Ruby, and JavaScript (Node.js). Building robust and secure web applications is my forte, as I understand the intricacies of server-side logic. My solutions are geared towards efficiency, reliability, and scalability, making sure that even during peak times, my applications deliver a smooth user experience."}],["$","p",null,{"children":"One of my proudest achievements is the creation of a groundbreaking web page that simplifies and speeds up form validation. This ingenious solution is designed to help people and businesses streamline their form validation process. By leveraging my extensive knowledge of web development and incorporating cutting-edge technologies, my page offers a lightning-fast and SUPER efficient way to validate forms. Its user-friendly interface and intuitive functionalities make it an indispensable tool for professionals seeking to enhance their productivity and accuracy in data collection."}],["$","p",null,{"children":"Apart from my technical skills, I thrive as a creative problem solver. I love tackling challenges with an innovative mindset and am always on the lookout for ways to enhance the user experience. My ability to think outside the box and deliver inventive solutions sets me apart as a true leader in the field of web development."}],["$","p",null,{"children":"When I'm not engrossed in code, you might find me seeking inspiration in the world around me. Whether I'm exploring the outdoors, immersing myself in art and culture, or engaging in thought-provoking discussions, I draw from a diverse range of experiences that shape my approach to programming and my interactions with colleagues and clients."}],["$","p",null,{"className":"last-p","children":"In conclusion, I am Gabriel Logan, a passionate programmer who seamlessly weaves front-end and back-end skills to create exceptional web experiences. My innovative mindset, attention to detail, and dedication to efficiency have led me to develop a groundbreaking page that I believe will make a significant impact on the world of form validation. As the digital landscape continues to evolve, I stand at the forefront, ready to embrace new challenges and make a difference through my exceptional work in web development."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","about","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["about",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["about",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Hello, I'm Gabriel Logan"}],["$","p",null,{"children":"I consider myself a versatile programmer with a passion for both front-end and back-end development. Crafting exceptional web experiences is what drives me, and I take immense pride in the work I produce."}],["$","p",null,{"children":"As a front-end developer, I have a keen eye for user experience and interface design. I love transforming creative concepts into visually captivating and interactive web applications using HTML, CSS, and JavaScript. From seamless navigation to smooth animations, I pay attention to every detail to ensure that my front-end projects exude elegance and functionality."}],["$","p",null,{"children":"But my skills don't stop there. I am equally proficient in back-end development, with expertise in languages such as Python, Ruby, and JavaScript (Node.js). Building robust and secure web applications is my forte, as I understand the intricacies of server-side logic. My solutions are geared towards efficiency, reliability, and scalability, making sure that even during peak times, my applications deliver a smooth user experience."}],["$","p",null,{"children":"One of my proudest achievements is the creation of a groundbreaking web page that simplifies and speeds up form validation. This ingenious solution is designed to help people and businesses streamline their form validation process. By leveraging my extensive knowledge of web development and incorporating cutting-edge technologies, my page offers a lightning-fast and SUPER efficient way to validate forms. Its user-friendly interface and intuitive functionalities make it an indispensable tool for professionals seeking to enhance their productivity and accuracy in data collection."}],["$","p",null,{"children":"Apart from my technical skills, I thrive as a creative problem solver. I love tackling challenges with an innovative mindset and am always on the lookout for ways to enhance the user experience. My ability to think outside the box and deliver inventive solutions sets me apart as a true leader in the field of web development."}],["$","p",null,{"children":"When I'm not engrossed in code, you might find me seeking inspiration in the world around me. Whether I'm exploring the outdoors, immersing myself in art and culture, or engaging in thought-provoking discussions, I draw from a diverse range of experiences that shape my approach to programming and my interactions with colleagues and clients."}],["$","p",null,{"className":"last-p","children":"In conclusion, I am Gabriel Logan, a passionate programmer who seamlessly weaves front-end and back-end skills to create exceptional web experiences. My innovative mindset, attention to detail, and dedication to efficiency have led me to develop a groundbreaking page that I believe will make a significant impact on the world of form validation. As the digital landscape continues to evolve, I stand at the forefront, ready to embrace new challenges and make a difference through my exceptional work in web development."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","about","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Multiform Validator"}],["$","meta","3",{"name":"description","content":"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation.html b/docs/page/documentation.html index 9df8b70..f98bf60 100644 --- a/docs/page/documentation.html +++ b/docs/page/documentation.html @@ -1 +1 @@ -Documentation

Multiform validator

Documentations Page

Welcome to the documentation page. Here you can find all the languages that we support and the documentation for each one of them.

Here's all the languages that we support

\ No newline at end of file +Documentation

Multiform validator

Documentations Page

Welcome to the documentation page. Here you can find all the languages that we support and the documentation for each one of them.

Here's all the languages that we support

\ No newline at end of file diff --git a/docs/page/documentation.txt b/docs/page/documentation.txt index b9af762..4b0b566 100644 --- a/docs/page/documentation.txt +++ b/docs/page/documentation.txt @@ -8,6 +8,6 @@ c:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 9:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} a:{"display":"inline-block"} b:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"className":"p-2","children":[["$","h1",null,{"className":"mb-4 text-3xl font-bold text-white sm:text-4xl","children":"Documentations Page"}],["$","p",null,{"className":"mb-8 text-lg text-white","children":"Welcome to the documentation page. Here you can find all the languages that we support and the documentation for each one of them."}],["$","h2",null,{"className":"mb-8 text-2xl font-semibold text-white","children":"Here's all the languages that we support"}],["$","div",null,{"className":"grid grid-cols-1 gap-4 md:grid-cols-3","children":[["$","$L2",null,{"href":"/documentation/js","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 24 24","color":"gold","children":["$undefined",[["$","path","0",{"d":"$3","children":[]}]]],"className":"$undefined","style":{"color":"gold"},"height":64,"width":64,"xmlns":"http://www.w3.org/2000/svg"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"JavaScript"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the JavaScript language."}]]}],["$","$L2",null,{"href":"/documentation/py","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","$L4",null,{"src":{"src":"/multiform-validator/_next/static/media/python-icon.bbb43845.svg","height":64,"width":64,"blurWidth":0,"blurHeight":0},"alt":"python-icon"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"Python"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the Python language."}]]}],["$","$L2",null,{"href":"/documentation","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","$L4",null,{"src":{"src":"/multiform-validator/_next/static/media/java-icon.6c9e7e06.svg","height":64,"width":64,"blurWidth":0,"blurHeight":0},"alt":"java-icon"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"Java"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the Java language."}],["$","p",null,{"className":"mt-2 text-center text-black","children":"In coming ..."}]]}]]}]]}]}]],null],null]},["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L7",null,{}],["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$8","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$9","children":"404"}],["$","div",null,{"style":"$a","children":["$","h2",null,{"style":"$b","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Lc",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Ld"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"className":"p-2","children":[["$","h1",null,{"className":"mb-4 text-3xl font-bold text-white sm:text-4xl","children":"Documentations Page"}],["$","p",null,{"className":"mb-8 text-lg text-white","children":"Welcome to the documentation page. Here you can find all the languages that we support and the documentation for each one of them."}],["$","h2",null,{"className":"mb-8 text-2xl font-semibold text-white","children":"Here's all the languages that we support"}],["$","div",null,{"className":"grid grid-cols-1 gap-4 md:grid-cols-3","children":[["$","$L2",null,{"href":"/documentation/js","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 24 24","color":"gold","children":["$undefined",[["$","path","0",{"d":"$3","children":[]}]]],"className":"$undefined","style":{"color":"gold"},"height":64,"width":64,"xmlns":"http://www.w3.org/2000/svg"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"JavaScript"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the JavaScript language."}]]}],["$","$L2",null,{"href":"/documentation/py","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","$L4",null,{"src":{"src":"/multiform-validator/_next/static/media/python-icon.bbb43845.svg","height":64,"width":64,"blurWidth":0,"blurHeight":0},"alt":"python-icon"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"Python"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the Python language."}]]}],["$","$L2",null,{"href":"/documentation","className":"mx-auto max-w-96 cursor-pointer rounded border-black bg-white p-4 shadow hover:scale-105 active:scale-100","children":[["$","$L4",null,{"src":{"src":"/multiform-validator/_next/static/media/java-icon.6c9e7e06.svg","height":64,"width":64,"blurWidth":0,"blurHeight":0},"alt":"java-icon"}],["$","h3",null,{"className":"mb-2 mt-1 text-xl font-semibold text-black","children":"Java"}],["$","p",null,{"className":"text-black","children":"Here you can find the documentation for the Java language."}],["$","p",null,{"className":"mt-2 text-center text-black","children":"In coming ..."}]]}]]}]]}]}]],null],null]},["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L7",null,{}],["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$8","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$9","children":"404"}],["$","div",null,{"style":"$a","children":["$","h2",null,{"style":"$b","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Lc",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Ld"]]]] d:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js.html b/docs/page/documentation/js.html index 50b4a45..61b3cc4 100644 --- a/docs/page/documentation/js.html +++ b/docs/page/documentation/js.html @@ -1,4 +1,4 @@ -Documentation

Official documentation

Welcome to the main page of Multiform Validator! Here, you will find detailed documentation for various functions provided by Multiform Validator, a useful JavaScript library for data validation. Each function is designed to assist in validating different types of data, making your code more robust and secure. Multiform Validator consists of a series of specialized functions that allow you to validate various data types, such as emails, passwords, names, surnames, passport numbers, phone numbers, and more. Each function has configurable parameters and provides customizable error messages to suit your project's needs. On each documentation page, you will find a comprehensive description of the function, including its purpose, accepted parameters, and usage examples. Additionally, you will have access to details about default error messages and how to customize them to fit your application. By using Multiform Validator, you can ensure that user input in your forms is correct and compliant with the established rules. This validation is essential to prevent issues such as invalid entries, corrupted data, or security vulnerabilities. We are continuously working to enhance and expand Multiform Validator with new features and improvements to make it an even more powerful and flexible tool for your validation needs. We hope that these documentations prove to be helpful and simplify the usage of Multiform Validator in your projects. Feel free to explore the various available functions and do not hesitate to reach out to us if you have any questions or suggestions. Thank you for choosing Multiform Validator as your data validation tool, and we wish you success in your projects! Multiform Validator Team

Multiform-validator

npm versionLicense: MITnpm downloads

This npm package provides JavaScript functions to validate various forms fields.

If you want to help me, you can buy me a coffee (:

Buy Me A Coffee

INFO:

All functions that have the name "validate" return an object with two properties, isValid: true|false and errorMsg: 'String with errors'

The remaining ones can return true|false|string|array, look at the doc for each one

Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!

Installation

npm install multiform-validator
yarn add multiform-validator

Data Validator

This package contains various modules for validating different types of data. Below are the available validation modules:

Available Validation Modules

  • cnpjValidator: CNPJ validation.
  • cpfValidator: CPF validation.
  • getOnlyEmail: Extracts only the email or emails address from a string.
  • identifyFlagCard: Identifies the flag of a credit card.
  • isAscii: Checks if the string contains only ASCII characters.
  • isBase64: Checks if the string is a valid Base64 encoding.
  • isCEP: CEP validation (Brazilian postal code).
  • isCreditCardValid: Credit card validation.
  • isDate: Date format validation.
  • isDecimal: Checks if the number is a decimal.
  • isEmail: Email address validation format.
  • isEmpty: Checks if the string is empty.
  • isMACAddress: MAC address validation.
  • isMD5: Checks if the string is a valid MD5 hash.
  • isNumber: Checks if the value is a number.
  • isPort: Port number validation.
  • isPostalCode: Postal code validation.
  • isTime: Time format validation.
  • isValidAudio Audio file validation.
  • isValidImage Image file validation.
  • isValidPdf Pdf file validation.
  • isValidTxt Txt file validation.
  • isValidVideo Video file validation.
  • passwordStrengthTester: Password strength test.
  • validateBRPhoneNumber: Brazilian phone number validation.
  • validateEmail: Email address full validation.
  • validateName: Name validation.
  • validatePassportNumber: Passport number validation.
  • validatePassword: Password validation.
  • validatePhoneNumber: Phone number validation.
  • validateSurname: Surname validation.
  • validateTextarea: Textarea validation.
  • validateUsername: Username validation.
  • validateUSPhoneNumber: US phone number validation.

if you prefer, you can use importing as:

const validator = require('multiform-validator');
+Documentation

Official documentation

Welcome to the main page of Multiform Validator! Here, you will find detailed documentation for various functions provided by Multiform Validator, a useful JavaScript library for data validation. Each function is designed to assist in validating different types of data, making your code more robust and secure. Multiform Validator consists of a series of specialized functions that allow you to validate various data types, such as emails, passwords, names, surnames, passport numbers, phone numbers, and more. Each function has configurable parameters and provides customizable error messages to suit your project's needs. On each documentation page, you will find a comprehensive description of the function, including its purpose, accepted parameters, and usage examples. Additionally, you will have access to details about default error messages and how to customize them to fit your application. By using Multiform Validator, you can ensure that user input in your forms is correct and compliant with the established rules. This validation is essential to prevent issues such as invalid entries, corrupted data, or security vulnerabilities. We are continuously working to enhance and expand Multiform Validator with new features and improvements to make it an even more powerful and flexible tool for your validation needs. We hope that these documentations prove to be helpful and simplify the usage of Multiform Validator in your projects. Feel free to explore the various available functions and do not hesitate to reach out to us if you have any questions or suggestions. Thank you for choosing Multiform Validator as your data validation tool, and we wish you success in your projects! Multiform Validator Team

Multiform-validator

npm versionLicense: MITnpm downloads

This npm package provides JavaScript functions to validate various forms fields.

If you want to help me, you can buy me a coffee (:

Buy Me A Coffee

INFO:

All functions that have the name "validate" return an object with two properties, isValid: true|false and errorMsg: 'String with errors'

The remaining ones can return true|false|string|array, look at the doc for each one

Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!

Installation

npm install multiform-validator
yarn add multiform-validator

Data Validator

This package contains various modules for validating different types of data. Below are the available validation modules:

Available Validation Modules

  • cnpjValidator: CNPJ validation.
  • cpfValidator: CPF validation.
  • getOnlyEmail: Extracts only the email or emails address from a string.
  • identifyFlagCard: Identifies the flag of a credit card.
  • isAscii: Checks if the string contains only ASCII characters.
  • isBase64: Checks if the string is a valid Base64 encoding.
  • isCEP: CEP validation (Brazilian postal code).
  • isCreditCardValid: Credit card validation.
  • isDate: Date format validation.
  • isDecimal: Checks if the number is a decimal.
  • isEmail: Email address validation format.
  • isEmpty: Checks if the string is empty.
  • isMACAddress: MAC address validation.
  • isMD5: Checks if the string is a valid MD5 hash.
  • isNumber: Checks if the value is a number.
  • isPort: Port number validation.
  • isPostalCode: Postal code validation.
  • isTime: Time format validation.
  • isValidAudio Audio file validation.
  • isValidImage Image file validation.
  • isValidPdf Pdf file validation.
  • isValidTxt Txt file validation.
  • isValidVideo Video file validation.
  • passwordStrengthTester: Password strength test.
  • validateBRPhoneNumber: Brazilian phone number validation.
  • validateEmail: Email address full validation.
  • validateName: Name validation.
  • validatePassportNumber: Passport number validation.
  • validatePassword: Password validation.
  • validatePhoneNumber: Phone number validation.
  • validateSurname: Surname validation.
  • validateTextarea: Textarea validation.
  • validateUsername: Username validation.
  • validateUSPhoneNumber: US phone number validation.

if you prefer, you can use importing as:

const validator = require('multiform-validator');
 // or
 import validator from 'multiform-validator';
 
@@ -11,4 +11,4 @@
 
 /**
 * There are other returns in some functions, with strings etc, stay tuned
-*/

If you want to help me, you can buy me a coffee (:

Buy Me A Coffee

Feel free to explore the various functions and experiment with different inputs to understand their behavior. If you encounter any issues or have suggestions, don't hesitate to reach out to me. Your feedback is valuable and helps improve the package. Happy coding!

By - Gabriel Logan

\ No newline at end of file +
*/

If you want to help me, you can buy me a coffee (:

Buy Me A Coffee

Feel free to explore the various functions and experiment with different inputs to understand their behavior. If you encounter any issues or have suggestions, don't hesitate to reach out to me. Your feedback is valuable and helps improve the package. Happy coding!

By - Gabriel Logan

\ No newline at end of file diff --git a/docs/page/documentation/js.txt b/docs/page/documentation/js.txt index d1032b9..eff940a 100644 --- a/docs/page/documentation/js.txt +++ b/docs/page/documentation/js.txt @@ -9,6 +9,6 @@ d:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["__PAGE__",{},[["$L1",["$","section",null,{"className":"min-h-screen p-8","children":["$","div",null,{"children":["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"mb-10 flex justify-around","children":[["$","$L2",null,{"href":"/","className":"rounded bg-gray-700 px-4 py-2 text-white","id":"menu-toggle","children":"Back to home page"}],["$","$L3",null,{}]]}],["$","div",null,{"children":[["$","h1",null,{"className":"text-3xl font-medium","children":"Official documentation"}],["$","p",null,{"className":"mt-4","children":"$4"}],["$","div",null,{"id":"examples_code","className":"mt-8","children":[["$","h1",null,{"className":"mb-4 text-xl font-semibold","children":"Multiform-validator"}],["$","p",null,{"className":"mb-6 flex justify-center gap-2","children":[["$","a",null,{"href":"https://badge.fury.io/js/multiform-validator.svg","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://badge.fury.io/js/multiform-validator.svg","alt":"npm version"}]}],["$","a",null,{"href":"https://opensource.org/licenses/MIT","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://img.shields.io/badge/License-MIT-yellow.svg","alt":"License: MIT"}]}],["$","a",null,{"href":"https://npm-stat.com/charts.html?package=multiform-validator","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://img.shields.io/npm/dm/multiform-validator.svg","alt":"npm downloads"}]}]]}],["$","p",null,{"children":"This npm package provides JavaScript functions to validate various forms fields."}],["$","p",null,{"className":"mb-4","children":"If you want to help me, you can buy me a coffee (:"}],["$","p",null,{"className":"mb-4 flex justify-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":[["$","$L5",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]," "]}]}],["$","strong",null,{"children":[["$","p",null,{"className":"mb-3","children":"INFO: "}],["$","p",null,{"className":"mb-3","children":"All functions that have the name \"validate\" return an object with two properties, isValid: true|false and errorMsg: 'String with errors'"}],["$","p",null,{"className":"mb-3","children":"The remaining ones can return true|false|string|array, look at the doc for each one"}]]}],["$","p",null,{"className":"mb-3","children":"Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!"}],["$","h2",null,{"className":"text-lg font-medium","children":"Installation"}],["$","div",null,{"className":"","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["npm"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["install"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","div",null,{"className":"","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["yarn"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["add"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","h1",null,{"className":"mb-3 text-2xl","children":"Data Validator"}],["$","p",null,{"className":"mb-3","children":"This package contains various modules for validating different types of data. Below are the available validation modules:"}],["$","h3",null,{"className":"mb-1 text-start font-medium","children":"Available Validation Modules"}],["$","ul",null,{"className":"mb-5 text-start","children":[["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"cnpjValidator:"}]," CNPJ validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"cpfValidator:"}]," CPF validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"getOnlyEmail:"}]," Extracts only the email or emails address from a string."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"identifyFlagCard:"}]," Identifies the flag of a credit card."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isAscii:"}]," Checks if the string contains only ASCII characters."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isBase64:"}]," Checks if the string is a valid Base64 encoding."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isCEP:"}]," CEP validation (Brazilian postal code)."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isCreditCardValid:"}]," Credit card validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isDate:"}]," Date format validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isDecimal:"}]," Checks if the number is a decimal."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isEmail:"}]," Email address validation format."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isEmpty:"}]," Checks if the string is empty."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isMACAddress:"}]," MAC address validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isMD5:"}]," Checks if the string is a valid MD5 hash."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isNumber:"}]," Checks if the value is a number."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isPort:"}]," Port number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isPostalCode:"}]," Postal code validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isTime:"}]," Time format validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidAudio"}]," Audio file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidImage"}]," Image file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidPdf"}]," Pdf file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidTxt"}]," Txt file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidVideo"}]," Video file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"passwordStrengthTester:"}]," Password strength test."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateBRPhoneNumber:"}]," Brazilian phone number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateEmail:"}]," Email address full validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateName:"}]," Name validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePassportNumber:"}]," Passport number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePassword:"}]," Password validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePhoneNumber:"}]," Phone number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateSurname:"}]," Surname validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateTextarea:"}]," Textarea validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateUsername:"}]," Username validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateUSPhoneNumber:"}]," US phone number validation."]}]]}],["$","p",null,{"className":"mb-3","children":"if you prefer, you can use importing as:"}],["$","div",null,{"className":"p-2","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" validator "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#d4d0ab"},"children":["// or"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token imports","style":{},"children":["validator"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token maybe-class-name","style":{},"children":["Attention"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" is not a valid "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" name"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["!"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token maybe-class-name","style":{},"children":["It"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" is just an example "]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["of"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" how to "]}],["$","span","code-segement39",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" the functions"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement44",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement45",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement55",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement57",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// or"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement73",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement75",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement79",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement80",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["/**\n"]}],["$","span","code-segement81",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* There are other returns in some functions, with strings etc, stay tuned\n"]}],["$","span","code-segement82",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["*/"]}]]]}]}]}],["$","p",null,{"className":"mb-4 mt-3","children":"If you want to help me, you can buy me a coffee (:"}],["$","p",null,{"className":"mb-4 flex justify-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":[["$","$L5",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]," "]}]}],["$","p",null,{"className":"mb-4","children":"Feel free to explore the various functions and experiment with different inputs to understand their behavior. If you encounter any issues or have suggestions, don't hesitate to reach out to me. Your feedback is valuable and helps improve the package. Happy coding!"}],["$","h2",null,{"className":"mb-6","children":"By - Gabriel Logan"}]]}]]}]]}]}]}]],null],null]},["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L8",null,{}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$9","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Ld",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Le"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["__PAGE__",{},[["$L1",["$","section",null,{"className":"min-h-screen p-8","children":["$","div",null,{"children":["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"mb-10 flex justify-around","children":[["$","$L2",null,{"href":"/","className":"rounded bg-gray-700 px-4 py-2 text-white","id":"menu-toggle","children":"Back to home page"}],["$","$L3",null,{}]]}],["$","div",null,{"children":[["$","h1",null,{"className":"text-3xl font-medium","children":"Official documentation"}],["$","p",null,{"className":"mt-4","children":"$4"}],["$","div",null,{"id":"examples_code","className":"mt-8","children":[["$","h1",null,{"className":"mb-4 text-xl font-semibold","children":"Multiform-validator"}],["$","p",null,{"className":"mb-6 flex justify-center gap-2","children":[["$","a",null,{"href":"https://badge.fury.io/js/multiform-validator.svg","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://badge.fury.io/js/multiform-validator.svg","alt":"npm version"}]}],["$","a",null,{"href":"https://opensource.org/licenses/MIT","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://img.shields.io/badge/License-MIT-yellow.svg","alt":"License: MIT"}]}],["$","a",null,{"href":"https://npm-stat.com/charts.html?package=multiform-validator","target":"_blank","children":["$","$L5",null,{"width":0,"height":0,"className":"h-auto w-auto","src":"https://img.shields.io/npm/dm/multiform-validator.svg","alt":"npm downloads"}]}]]}],["$","p",null,{"children":"This npm package provides JavaScript functions to validate various forms fields."}],["$","p",null,{"className":"mb-4","children":"If you want to help me, you can buy me a coffee (:"}],["$","p",null,{"className":"mb-4 flex justify-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":[["$","$L5",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]," "]}]}],["$","strong",null,{"children":[["$","p",null,{"className":"mb-3","children":"INFO: "}],["$","p",null,{"className":"mb-3","children":"All functions that have the name \"validate\" return an object with two properties, isValid: true|false and errorMsg: 'String with errors'"}],["$","p",null,{"className":"mb-3","children":"The remaining ones can return true|false|string|array, look at the doc for each one"}]]}],["$","p",null,{"className":"mb-3","children":"Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!"}],["$","h2",null,{"className":"text-lg font-medium","children":"Installation"}],["$","div",null,{"className":"","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["npm"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["install"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","div",null,{"className":"","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["yarn"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["add"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","h1",null,{"className":"mb-3 text-2xl","children":"Data Validator"}],["$","p",null,{"className":"mb-3","children":"This package contains various modules for validating different types of data. Below are the available validation modules:"}],["$","h3",null,{"className":"mb-1 text-start font-medium","children":"Available Validation Modules"}],["$","ul",null,{"className":"mb-5 text-start","children":[["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"cnpjValidator:"}]," CNPJ validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"cpfValidator:"}]," CPF validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"getOnlyEmail:"}]," Extracts only the email or emails address from a string."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"identifyFlagCard:"}]," Identifies the flag of a credit card."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isAscii:"}]," Checks if the string contains only ASCII characters."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isBase64:"}]," Checks if the string is a valid Base64 encoding."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isCEP:"}]," CEP validation (Brazilian postal code)."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isCreditCardValid:"}]," Credit card validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isDate:"}]," Date format validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isDecimal:"}]," Checks if the number is a decimal."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isEmail:"}]," Email address validation format."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isEmpty:"}]," Checks if the string is empty."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isMACAddress:"}]," MAC address validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isMD5:"}]," Checks if the string is a valid MD5 hash."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isNumber:"}]," Checks if the value is a number."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isPort:"}]," Port number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isPostalCode:"}]," Postal code validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isTime:"}]," Time format validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidAudio"}]," Audio file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidImage"}]," Image file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidPdf"}]," Pdf file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidTxt"}]," Txt file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"isValidVideo"}]," Video file validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"passwordStrengthTester:"}]," Password strength test."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateBRPhoneNumber:"}]," Brazilian phone number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateEmail:"}]," Email address full validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateName:"}]," Name validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePassportNumber:"}]," Passport number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePassword:"}]," Password validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validatePhoneNumber:"}]," Phone number validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateSurname:"}]," Surname validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateTextarea:"}]," Textarea validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateUsername:"}]," Username validation."]}],["$","li",null,{"className":"mb-1 ml-10 list-disc","children":[["$","strong",null,{"children":"validateUSPhoneNumber:"}]," US phone number validation."]}]]}],["$","p",null,{"className":"mb-3","children":"if you prefer, you can use importing as:"}],["$","div",null,{"className":"p-2","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" validator "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#d4d0ab"},"children":["// or"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token imports","style":{},"children":["validator"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token maybe-class-name","style":{},"children":["Attention"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" is not a valid "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" name"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["!"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token maybe-class-name","style":{},"children":["It"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" is just an example "]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["of"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" how to "]}],["$","span","code-segement39",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" the functions"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement44",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement45",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement55",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement57",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// or"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#ffa07a"},"children":["FUNCTION_NAME"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement73",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement75",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement79",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement80",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["/**\n"]}],["$","span","code-segement81",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* There are other returns in some functions, with strings etc, stay tuned\n"]}],["$","span","code-segement82",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["*/"]}]]]}]}]}],["$","p",null,{"className":"mb-4 mt-3","children":"If you want to help me, you can buy me a coffee (:"}],["$","p",null,{"className":"mb-4 flex justify-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":[["$","$L5",null,{"width":217,"height":60,"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee"}]," "]}]}],["$","p",null,{"className":"mb-4","children":"Feel free to explore the various functions and experiment with different inputs to understand their behavior. If you encounter any issues or have suggestions, don't hesitate to reach out to me. Your feedback is valuable and helps improve the package. Happy coding!"}],["$","h2",null,{"className":"mb-6","children":"By - Gabriel Logan"}]]}]]}]]}]}]}]],null],null]},["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L8",null,{}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$9","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Ld",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Le"]]]] e:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/cnpjIsValid.html b/docs/page/documentation/js/functions/cnpjIsValid.html index 24dfb98..3885d79 100644 --- a/docs/page/documentation/js/functions/cnpjIsValid.html +++ b/docs/page/documentation/js/functions/cnpjIsValid.html @@ -1,4 +1,4 @@ -Documentation

cnpjIsValid Function Documentation

The cnpjIsValid function is used to validate a Brazilian CNPJ (National Registry of Legal Entities) number. It returns an object containing the isValid (boolean) and errorMsg (string) properties, indicating whether the CNPJ is valid and, in case of an error, the corresponding error message.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { cnpjIsValid } from 'multiform-validator';

Parameters

The function takes two parameters:

Examples

// Example 1 - Using the CNPJ number '72.501.263/0001-40' const
+Documentation

cnpjIsValid Function Documentation

The cnpjIsValid function is used to validate a Brazilian CNPJ (National Registry of Legal Entities) number. It returns an object containing the isValid (boolean) and errorMsg (string) properties, indicating whether the CNPJ is valid and, in case of an error, the corresponding error message.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { cnpjIsValid } from 'multiform-validator';

Parameters

The function takes two parameters:

  • cnpj (string) - The CNPJ number to validate.
  • errorMsg (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages.

Examples

// Example 1 - Using the CNPJ number '72.501.263/0001-40' const
 result1 = cnpjIsValid('72.501.263/0001-40');
 console.log(result1.isValid); // true
 console.log(result1.errorMsg); // null
@@ -6,4 +6,4 @@
 // Example 2 - Using the CNPJ number '73.506.263/0001-45' and custom error messages
 const result2 = cnpjIsValid('73.506.263/0001-45', ['CNPJ is wrong']);
 console.log(result2.isValid); // false
-console.log(result2.errorMsg); // 'CNPJ is wrong'

Notes

If the function is called with an invalid value for the errorMsg parameter (non-array), or if an error occurs during the validation process, the function will return an object with isValid set to false and errorMsg containing the default error message 'Unknown error'.

\ No newline at end of file +
console.log(result2.errorMsg); // 'CNPJ is wrong'

Notes

If the function is called with an invalid value for the errorMsg parameter (non-array), or if an error occurs during the validation process, the function will return an object with isValid set to false and errorMsg containing the default error message 'Unknown error'.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/cnpjIsValid.txt b/docs/page/documentation/js/functions/cnpjIsValid.txt index bb53282..0d4e96a 100644 --- a/docs/page/documentation/js/functions/cnpjIsValid.txt +++ b/docs/page/documentation/js/functions/cnpjIsValid.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6494","static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-4fa3f9a15df90666.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6494","static/chunks/app/(doc-session)/documentation/js/functions/cnpjIsValid/page-13f8a19dcacd3247.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cnpjIsValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cnpjIsValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"cnpjIsValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"cnpjIsValid"}]," function is used to validate a Brazilian CNPJ (National Registry of Legal Entities) number. It returns an object containing the ",["$","code",null,{"children":"isValid"}]," (boolean) and"," ",["$","code",null,{"children":"errorMsg"}]," (string) properties, indicating whether the CNPJ is valid and, in case of an error, the corresponding error message."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" cnpjIsValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"cnpj"}]," (string) - The CNPJ number to validate."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Using the CNPJ number '72.501.263/0001-40' const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["result1 "]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#ffd700"},"children":["cnpjIsValid"]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'72.501.263/0001-40'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement14",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement27",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement31",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement35",{"className":"token","style":{"color":"#d4d0ab"},"children":["// null"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Using the CNPJ number '73.506.263/0001-45' and custom error messages"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#ffd700"},"children":["cnpjIsValid"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement48",{"className":"token","style":{"color":"#abe338"},"children":["'73.506.263/0001-45'"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["'CNPJ is wrong'"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement60",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement71",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement73",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement77",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement81",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CNPJ is wrong'"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["If the function is called with an invalid value for the"," ",["$","code",null,{"children":"errorMsg"}]," parameter (non-array), or if an error occurs during the validation process, the function will return an object with"," ",["$","code",null,{"children":"isValid"}]," set to ",["$","code",null,{"children":"false"}]," and"," ",["$","code",null,{"children":"errorMsg"}]," containing the default error message 'Unknown error'."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","cnpjIsValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cnpjIsValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cnpjIsValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"cnpjIsValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"cnpjIsValid"}]," function is used to validate a Brazilian CNPJ (National Registry of Legal Entities) number. It returns an object containing the ",["$","code",null,{"children":"isValid"}]," (boolean) and"," ",["$","code",null,{"children":"errorMsg"}]," (string) properties, indicating whether the CNPJ is valid and, in case of an error, the corresponding error message."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" cnpjIsValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"cnpj"}]," (string) - The CNPJ number to validate."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Using the CNPJ number '72.501.263/0001-40' const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["result1 "]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#ffd700"},"children":["cnpjIsValid"]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'72.501.263/0001-40'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement14",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement27",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement31",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement35",{"className":"token","style":{"color":"#d4d0ab"},"children":["// null"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Using the CNPJ number '73.506.263/0001-45' and custom error messages"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#ffd700"},"children":["cnpjIsValid"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement48",{"className":"token","style":{"color":"#abe338"},"children":["'73.506.263/0001-45'"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["'CNPJ is wrong'"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement60",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement71",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement73",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement77",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement81",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CNPJ is wrong'"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["If the function is called with an invalid value for the"," ",["$","code",null,{"children":"errorMsg"}]," parameter (non-array), or if an error occurs during the validation process, the function will return an object with"," ",["$","code",null,{"children":"isValid"}]," set to ",["$","code",null,{"children":"false"}]," and"," ",["$","code",null,{"children":"errorMsg"}]," containing the default error message 'Unknown error'."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","cnpjIsValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/cpfIsValid.html b/docs/page/documentation/js/functions/cpfIsValid.html index 83e9d4d..2bebb06 100644 --- a/docs/page/documentation/js/functions/cpfIsValid.html +++ b/docs/page/documentation/js/functions/cpfIsValid.html @@ -1,4 +1,4 @@ -Documentation

cpfIsValid Function Documentation

The cpfIsValid function is used to validate a Brazilian CPF (Individual Taxpayer Identification) number. It returns an object containing the isValid (boolean) and errorMsg (string) properties, indicating whether the CPF is valid and, in case of an error, the corresponding error message.

Import

There are two ways to import the function:

Parameters

The function takes two parameters:

Examples

// Example 1 - Using the CPF number '123.456.789.10'
+Documentation

cpfIsValid Function Documentation

The cpfIsValid function is used to validate a Brazilian CPF (Individual Taxpayer Identification) number. It returns an object containing the isValid (boolean) and errorMsg (string) properties, indicating whether the CPF is valid and, in case of an error, the corresponding error message.

Import

There are two ways to import the function:

  • Using require (Node.js):
  • const { cpfIsValid } = require('multiform-validator');
  • Using import (ES6):
  • import { cpfIsValid } from 'multiform-validator';

Parameters

The function takes two parameters:

  • cpf (string) - The CPF number to validate.
  • errorMsg (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages.

Examples

// Example 1 - Using the CPF number '123.456.789.10'
 const result1 = cpfIsValid('123.456.789.10');
 console.log(result1.isValid); // false
 console.log(result1.errorMsg); // 'CPF invalid'
@@ -14,4 +14,4 @@
 // Example 3 - Using a valid CPF number '52998224725'
 const result3 = cpfIsValid('52998224725');
 console.log(result3.isValid); // true
-console.log(result3.errorMsg); // null

Notes

If the function is called with an invalid value for the errorMsg parameter (non-array), or if an error occurs during the validation process, the function will return an object with isValid set to false and errorMsg containing the default error message 'Unknown error'.

\ No newline at end of file +
console.log(result3.errorMsg); // null

Notes

If the function is called with an invalid value for the errorMsg parameter (non-array), or if an error occurs during the validation process, the function will return an object with isValid set to false and errorMsg containing the default error message 'Unknown error'.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/cpfIsValid.txt b/docs/page/documentation/js/functions/cpfIsValid.txt index 1c26c34..d5e2eb0 100644 --- a/docs/page/documentation/js/functions/cpfIsValid.txt +++ b/docs/page/documentation/js/functions/cpfIsValid.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8080","static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-b561c57dc82f8c33.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8080","static/chunks/app/(doc-session)/documentation/js/functions/cpfIsValid/page-4cfd7b116bdd6c4c.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cpfIsValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cpfIsValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"cpfIsValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"cpfIsValid"}]," function is used to validate a Brazilian CPF (Individual Taxpayer Identification) number. It returns an object containing the ",["$","code",null,{"children":"isValid"}]," (boolean) and"," ",["$","code",null,{"children":"errorMsg"}]," (string) properties, indicating whether the CPF is valid and, in case of an error, the corresponding error message."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"There are two ways to import the function:"}],["$","ul",null,{"children":[["$","li",null,{"children":["$","strong",null,{"children":["Using ",["$","code",null,{"children":"require"}]," (Node.js):"]}]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" cpfIsValid "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","li",null,{"children":["$","strong",null,{"children":["Using ",["$","code",null,{"children":"import"}]," (ES6):"]}]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" cpfIsValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}]]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"cpf"}]," (string) - The CPF number to validate."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Using the CPF number '123.456.789.10'"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'123.456.789.10'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement20",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement29",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement37",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CPF invalid'"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement40",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement41",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Using the CPF number '12345678910' and custom error messages"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement50",{"className":"token","style":{"color":"#abe338"},"children":["\"12345678910\""]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#abe338"},"children":["\"CPF is wrong\""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#abe338"},"children":["\"Must have at least 11 digits\""]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement69",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement71",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement75",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement82",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement84",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement88",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CPF is wrong'"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement95",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement96",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Using a valid CPF number '52998224725'"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement99",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement101",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement103",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement105",{"className":"token","style":{"color":"#abe338"},"children":["'52998224725'"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement107",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement110",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement112",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement116",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement123",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement124",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement125",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement129",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token","style":{"color":"#d4d0ab"},"children":["// null"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["If the function is called with an invalid value for the"," ",["$","code",null,{"children":"errorMsg"}]," parameter (non-array), or if an error occurs during the validation process, the function will return an object with"," ",["$","code",null,{"children":"isValid"}]," set to ",["$","code",null,{"children":"false"}]," and"," ",["$","code",null,{"children":"errorMsg"}]," containing the default error message 'Unknown error'."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","cpfIsValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cpfIsValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["cpfIsValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"cpfIsValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"cpfIsValid"}]," function is used to validate a Brazilian CPF (Individual Taxpayer Identification) number. It returns an object containing the ",["$","code",null,{"children":"isValid"}]," (boolean) and"," ",["$","code",null,{"children":"errorMsg"}]," (string) properties, indicating whether the CPF is valid and, in case of an error, the corresponding error message."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"There are two ways to import the function:"}],["$","ul",null,{"children":[["$","li",null,{"children":["$","strong",null,{"children":["Using ",["$","code",null,{"children":"require"}]," (Node.js):"]}]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" cpfIsValid "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","li",null,{"children":["$","strong",null,{"children":["Using ",["$","code",null,{"children":"import"}]," (ES6):"]}]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" cpfIsValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}]]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"cpf"}]," (string) - The CPF number to validate."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (optional array) - A list of custom error messages. If not provided, it uses a default list of error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Using the CPF number '123.456.789.10'"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'123.456.789.10'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement20",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement29",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement37",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CPF invalid'"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement40",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement41",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Using the CPF number '12345678910' and custom error messages"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement50",{"className":"token","style":{"color":"#abe338"},"children":["\"12345678910\""]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#abe338"},"children":["\"CPF is wrong\""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#abe338"},"children":["\"Must have at least 11 digits\""]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement69",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement71",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement75",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement82",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement84",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement88",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#d4d0ab"},"children":["// 'CPF is wrong'"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement95",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement96",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Using a valid CPF number '52998224725'"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement99",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement101",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement103",{"className":"token","style":{"color":"#ffd700"},"children":["cpfIsValid"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement105",{"className":"token","style":{"color":"#abe338"},"children":["'52998224725'"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement107",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement110",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement112",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement116",{"className":"token property-access","style":{},"children":["isValid"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement123",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement124",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement125",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement129",{"className":"token property-access","style":{},"children":["errorMsg"]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token","style":{"color":"#d4d0ab"},"children":["// null"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["If the function is called with an invalid value for the"," ",["$","code",null,{"children":"errorMsg"}]," parameter (non-array), or if an error occurs during the validation process, the function will return an object with"," ",["$","code",null,{"children":"isValid"}]," set to ",["$","code",null,{"children":"false"}]," and"," ",["$","code",null,{"children":"errorMsg"}]," containing the default error message 'Unknown error'."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","cpfIsValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/getOnlyEmail.html b/docs/page/documentation/js/functions/getOnlyEmail.html index ffa9088..46cb40e 100644 --- a/docs/page/documentation/js/functions/getOnlyEmail.html +++ b/docs/page/documentation/js/functions/getOnlyEmail.html @@ -1,4 +1,4 @@ -Documentation

getOnlyEmail Function Documentation

The getOnlyEmail function extracts email addresses from a given text. If the optional multiple parameter is set to true, it returns an array with all the email addresses found. Otherwise, it returns only the first email address found as a string.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { getOnlyEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { getOnlyEmail } = require('multiform-validator');

Parameters

The function takes two parameters:

Examples

// Example 1 - Extracting multiple emails from the text
+Documentation

getOnlyEmail Function Documentation

The getOnlyEmail function extracts email addresses from a given text. If the optional multiple parameter is set to true, it returns an array with all the email addresses found. Otherwise, it returns only the first email address found as a string.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { getOnlyEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { getOnlyEmail } = require('multiform-validator');

Parameters

The function takes two parameters:

  • text (string) - The input text from which emails will be extracted.
  • multiple (optional boolean) - If set to true, the function will return an array with all the email addresses found. If set to false or not provided, it will return only the first email address found as a string.
  • cleanDomain (optional boolean | string[]) - Either a boolean value indicating whether to clean after default domains or an array of custom domains to clean after. Default is false which means it won't clean the email addresses after default domains ['.br', '.io', '.pt', '.us', '.org', '.com', ];. If set to true, it will clean after default domains. If set to an array of strings, it will clean after the specified custom domains.
  • repeatEmail (optional boolean) - If set to false, the function will remove duplicate emails from the output list. If set to true or not provided, it will keep the duplicate emails in the output list.

Examples

// Example 1 - Extracting multiple emails from the text
 const result1 = getOnlyEmail(
 	"Entre em contato com a equipe: joao@empresa.com, maria@empresa.com, contato@empresa.com",
 	{ multiple: true },
@@ -25,4 +25,4 @@
 	{ multiple: true, cleanDomain: true, repeatEmail: true },
 );
 console.log(result4);
-// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com', 'fiawn@rdwah.com' ]

Notes

If no email address is found in the input text, the function will return the string "No email found".

\ No newline at end of file +
// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com', 'fiawn@rdwah.com' ]

Notes

If no email address is found in the input text, the function will return the string "No email found".

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/getOnlyEmail.txt b/docs/page/documentation/js/functions/getOnlyEmail.txt index ea6bfac..b935304 100644 --- a/docs/page/documentation/js/functions/getOnlyEmail.txt +++ b/docs/page/documentation/js/functions/getOnlyEmail.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7226","static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-e052e01a5b437628.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7226","static/chunks/app/(doc-session)/documentation/js/functions/getOnlyEmail/page-18e5f1729aaa50f0.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["getOnlyEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["getOnlyEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"getOnlyEmail Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"getOnlyEmail"}]," function extracts email addresses from a given text. If the optional ",["$","code",null,{"children":"multiple"}]," parameter is set to"," ",["$","code",null,{"children":"true"}],", it returns an array with all the email addresses found. Otherwise, it returns only the first email address found as a string."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" getOnlyEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" getOnlyEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"text"}]," (string) - The input text from which emails will be extracted."]}],["$","li",null,{"children":[["$","code",null,{"children":"multiple"}]," (optional boolean) - If set to"," ",["$","code",null,{"children":"true"}],", the function will return an array with all the email addresses found. If set to ",["$","code",null,{"children":"false"}]," or not provided, it will return only the first email address found as a string."]}],["$","li",null,{"children":[["$","code",null,{"children":"cleanDomain"}]," (optional boolean | string[]) - Either a boolean value indicating whether to clean after default domains or an array of custom domains to clean after. Default is"," ",["$","code",null,{"children":"false"}]," which means it won't clean the email addresses after default domains ['.br', '.io', '.pt', '.us', '.org', '.com', ];. If set to ",["$","code",null,{"children":"true"}],", it will clean after default domains. If set to an array of strings, it will clean after the specified custom domains."]}],["$","li",null,{"children":[["$","code",null,{"children":"repeatEmail"}]," (optional boolean) - If set to"," ",["$","code",null,{"children":"false"}],", the function will remove duplicate emails from the output list. If set to ",["$","code",null,{"children":"true"}]," or not provided, it will keep the duplicate emails in the output list."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Extracting multiple emails from the text"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["\"Entre em contato com a equipe: joao@empresa.com, maria@empresa.com, contato@empresa.com\""]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement17",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement18",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement30",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement32",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [\"joao@empresa.com\", \"maria@empresa.com\", \"contato@empresa.com\"]"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement42",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement43",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Extracting the first email from the text"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.com Sim aqui mesmo\""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement71",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"fiawn@rdwah.com\""]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.comSim aqui asdasd@gmail.commesmo\""]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement89",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement94",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement95",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["cleanDomain"]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement117",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com' ]"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.comSim aqui asdasd@gmail.commesmo asdasd asd as fiawn@rdwah.com\""]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement134",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement135",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement141",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["cleanDomain"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement147",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["repeatEmail"]}],["$","span","code-segement148",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement149",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement150",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement151",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement153",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement157",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement158",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement160",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement161",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement162",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement165",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement166",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement167",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement169",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com', 'fiawn@rdwah.com' ]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"If no email address is found in the input text, the function will return the string \"No email found\"."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","getOnlyEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["getOnlyEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["getOnlyEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"getOnlyEmail Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"getOnlyEmail"}]," function extracts email addresses from a given text. If the optional ",["$","code",null,{"children":"multiple"}]," parameter is set to"," ",["$","code",null,{"children":"true"}],", it returns an array with all the email addresses found. Otherwise, it returns only the first email address found as a string."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" getOnlyEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" getOnlyEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"text"}]," (string) - The input text from which emails will be extracted."]}],["$","li",null,{"children":[["$","code",null,{"children":"multiple"}]," (optional boolean) - If set to"," ",["$","code",null,{"children":"true"}],", the function will return an array with all the email addresses found. If set to ",["$","code",null,{"children":"false"}]," or not provided, it will return only the first email address found as a string."]}],["$","li",null,{"children":[["$","code",null,{"children":"cleanDomain"}]," (optional boolean | string[]) - Either a boolean value indicating whether to clean after default domains or an array of custom domains to clean after. Default is"," ",["$","code",null,{"children":"false"}]," which means it won't clean the email addresses after default domains ['.br', '.io', '.pt', '.us', '.org', '.com', ];. If set to ",["$","code",null,{"children":"true"}],", it will clean after default domains. If set to an array of strings, it will clean after the specified custom domains."]}],["$","li",null,{"children":[["$","code",null,{"children":"repeatEmail"}]," (optional boolean) - If set to"," ",["$","code",null,{"children":"false"}],", the function will remove duplicate emails from the output list. If set to ",["$","code",null,{"children":"true"}]," or not provided, it will keep the duplicate emails in the output list."]}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Extracting multiple emails from the text"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["\"Entre em contato com a equipe: joao@empresa.com, maria@empresa.com, contato@empresa.com\""]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement17",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement18",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement30",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement32",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [\"joao@empresa.com\", \"maria@empresa.com\", \"contato@empresa.com\"]"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement42",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement43",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Extracting the first email from the text"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.com Sim aqui mesmo\""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement71",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"fiawn@rdwah.com\""]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.comSim aqui asdasd@gmail.commesmo\""]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement89",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement94",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement95",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["cleanDomain"]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement117",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com' ]"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["getOnlyEmail"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#abe338"},"children":["\"Vaga na asdlaod Mande seu email para fiawn@rdwah.comSim aqui asdasd@gmail.commesmo asdasd asd as fiawn@rdwah.com\""]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement134",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement135",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["multiple"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement141",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["cleanDomain"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement147",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["repeatEmail"]}],["$","span","code-segement148",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement149",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement150",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement151",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement153",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement157",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement158",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement160",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement161",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement162",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement165",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement166",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement167",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement169",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: [ 'fiawn@rdwah.com', 'asdasd@gmail.com', 'fiawn@rdwah.com' ]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"If no email address is found in the input text, the function will return the string \"No email found\"."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","getOnlyEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/identifyFlagCard.html b/docs/page/documentation/js/functions/identifyFlagCard.html index 360c275..c537419 100644 --- a/docs/page/documentation/js/functions/identifyFlagCard.html +++ b/docs/page/documentation/js/functions/identifyFlagCard.html @@ -1,3 +1,3 @@ -Documentation

identifyFlagCard Function Documentation

The identifyFlagCard function is used to identify the credit card flag based on the first digits of the card number. It returns the name of the card flag as a string.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { identifyFlagCard } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { identifyFlagCard } = require('multiform-validator');

Parameters

The function takes one parameter:

Example

// Example 1 - Identifying the card flag based on the first digits
+Documentation

identifyFlagCard Function Documentation

The identifyFlagCard function is used to identify the credit card flag based on the first digits of the card number. It returns the name of the card flag as a string.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { identifyFlagCard } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { identifyFlagCard } = require('multiform-validator');

Parameters

The function takes one parameter:

  • cardNumber (string) - The credit card number for which to identify the flag based on the first digits.

Example

// Example 1 - Identifying the card flag based on the first digits
 const result = identifyFlagCard('6062 8226 8644 9791');
-console.log(result); // Output: "Discover"

Notes

The function expects the credit card number to be passed as a string. It uses the first digits of the card number to identify the card flag and returns the corresponding flag name as a string. If the card flag cannot be identified or the input is not a string, it returns "Unknown".

\ No newline at end of file +
console.log(result); // Output: "Discover"

Notes

The function expects the credit card number to be passed as a string. It uses the first digits of the card number to identify the card flag and returns the corresponding flag name as a string. If the card flag cannot be identified or the input is not a string, it returns "Unknown".

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/identifyFlagCard.txt b/docs/page/documentation/js/functions/identifyFlagCard.txt index 7cd0fa0..3190c78 100644 --- a/docs/page/documentation/js/functions/identifyFlagCard.txt +++ b/docs/page/documentation/js/functions/identifyFlagCard.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4649","static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-41d2e137e9fa92c9.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4649","static/chunks/app/(doc-session)/documentation/js/functions/identifyFlagCard/page-de82b82d78cae53f.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["identifyFlagCard",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["identifyFlagCard",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"identifyFlagCard Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"identifyFlagCard"}]," function is used to identify the credit card flag based on the first digits of the card number. It returns the name of the card flag as a string."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" identifyFlagCard "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"className":"mt-3","children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" identifyFlagCard "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cardNumber"}]," (string) - The credit card number for which to identify the flag based on the first digits."]}]}],["$","h2",null,{"className":"subtitle","children":"Example"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Identifying the card flag based on the first digits"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["identifyFlagCard"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'6062 8226 8644 9791'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"Discover\""]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the credit card number to be passed as a string. It uses the first digits of the card number to identify the card flag and returns the corresponding flag name as a string. If the card flag cannot be identified or the input is not a string, it returns \"Unknown\"."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","identifyFlagCard","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["identifyFlagCard",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["identifyFlagCard",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"identifyFlagCard Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"identifyFlagCard"}]," function is used to identify the credit card flag based on the first digits of the card number. It returns the name of the card flag as a string."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" identifyFlagCard "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"className":"mt-3","children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" identifyFlagCard "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cardNumber"}]," (string) - The credit card number for which to identify the flag based on the first digits."]}]}],["$","h2",null,{"className":"subtitle","children":"Example"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Identifying the card flag based on the first digits"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["identifyFlagCard"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'6062 8226 8644 9791'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"Discover\""]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the credit card number to be passed as a string. It uses the first digits of the card number to identify the card flag and returns the corresponding flag name as a string. If the card flag cannot be identified or the input is not a string, it returns \"Unknown\"."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","identifyFlagCard","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isAscii.html b/docs/page/documentation/js/functions/isAscii.html index 136e3bb..6594c75 100644 --- a/docs/page/documentation/js/functions/isAscii.html +++ b/docs/page/documentation/js/functions/isAscii.html @@ -1,4 +1,4 @@ -Documentation

isAscii Function Documentation

The isAscii function checks if the input string contains only ASCII characters. It returns true if the string is composed of ASCII characters, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isAscii } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isAscii } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Checking if the string contains only ASCII characters
+Documentation

isAscii Function Documentation

The isAscii function checks if the input string contains only ASCII characters. It returns true if the string is composed of ASCII characters, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isAscii } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isAscii } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string) - The input string to check for ASCII characters.

Examples

// Example 1 - Checking if the string contains only ASCII characters
 const result1 = isAscii('Hello');
 console.log(result1); // true
 
@@ -16,4 +16,4 @@
 
 // Example 5 - Checking an undefined value
 const result5 = isAscii(undefined);
-console.log(result5); // false

Notes

The function expects the input value to be passed as a string. It checks each character of the string, and if any character has a character code greater than 127 (non-ASCII), the function returns false. If the input is not a string or an empty string, it throws an error.

\ No newline at end of file +
console.log(result5); // false

Notes

The function expects the input value to be passed as a string. It checks each character of the string, and if any character has a character code greater than 127 (non-ASCII), the function returns false. If the input is not a string or an empty string, it throws an error.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isAscii.txt b/docs/page/documentation/js/functions/isAscii.txt index 5b62edc..f0a82d0 100644 --- a/docs/page/documentation/js/functions/isAscii.txt +++ b/docs/page/documentation/js/functions/isAscii.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","9714","static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-7c8512bdbab8c44f.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","9714","static/chunks/app/(doc-session)/documentation/js/functions/isAscii/page-8d62f3afa4390b19.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isAscii",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isAscii",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isAscii Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isAscii"}]," function checks if the input string contains only ASCII characters. It returns ",["$","code",null,{"children":"true"}]," if the string is composed of ASCII characters, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isAscii "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isAscii "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check for ASCII characters."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the string contains only ASCII characters"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking a non-ASCII string"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'こんにちは'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking a string with only ASCII characters"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4 - Checking a null value"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement83",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement94",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement103",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement104",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 5 - Checking an undefined value"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement107",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement109",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement111",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement113",{"className":"token nil","style":{"color":"#00e0e0"},"children":["undefined"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement120",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement124",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input value to be passed as a string. It checks each character of the string, and if any character has a character code greater than 127 (non-ASCII), the function returns"," ",["$","code",null,{"children":"false"}],". If the input is not a string or an empty string, it throws an error."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isAscii","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isAscii",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isAscii",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isAscii Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isAscii"}]," function checks if the input string contains only ASCII characters. It returns ",["$","code",null,{"children":"true"}]," if the string is composed of ASCII characters, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isAscii "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isAscii "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check for ASCII characters."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the string contains only ASCII characters"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking a non-ASCII string"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'こんにちは'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking a string with only ASCII characters"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4 - Checking a null value"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement83",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement94",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement103",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement104",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 5 - Checking an undefined value"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement107",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement109",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement111",{"className":"token","style":{"color":"#ffd700"},"children":["isAscii"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement113",{"className":"token nil","style":{"color":"#00e0e0"},"children":["undefined"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement120",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement124",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input value to be passed as a string. It checks each character of the string, and if any character has a character code greater than 127 (non-ASCII), the function returns"," ",["$","code",null,{"children":"false"}],". If the input is not a string or an empty string, it throws an error."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isAscii","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isBase64.html b/docs/page/documentation/js/functions/isBase64.html index 48ef767..c98eb94 100644 --- a/docs/page/documentation/js/functions/isBase64.html +++ b/docs/page/documentation/js/functions/isBase64.html @@ -1,4 +1,4 @@ -Documentation

isBase64 Function Documentation

The isBase64 function checks if the input string is a valid Base64 string. It returns true if the string is a valid Base64, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isBase64 } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isBase64 } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Checking if the string is a valid Base64
+Documentation

isBase64 Function Documentation

The isBase64 function checks if the input string is a valid Base64 string. It returns true if the string is a valid Base64, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isBase64 } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isBase64 } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string) - The input string to check if it is a valid Base64 string.

Examples

// Example 1 - Checking if the string is a valid Base64
 const result1 = isBase64('SGVsbG8gV29ybGQh');
 console.log(result1); // true
 
@@ -12,4 +12,4 @@
 
 // Example 4 - Checking a null value
 const result4 = isBase64(null);
-console.log(result4); // false

Notes

The function expects the input value to be passed as a string. It checks if the string is a valid Base64 string using a regular expression. If the input is not a string or an empty string, it throws an error.

\ No newline at end of file +
console.log(result4); // false

Notes

The function expects the input value to be passed as a string. It checks if the string is a valid Base64 string using a regular expression. If the input is not a string or an empty string, it throws an error.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isBase64.txt b/docs/page/documentation/js/functions/isBase64.txt index a945c67..b40ae0a 100644 --- a/docs/page/documentation/js/functions/isBase64.txt +++ b/docs/page/documentation/js/functions/isBase64.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7762","static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-187969de1c7f279c.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7762","static/chunks/app/(doc-session)/documentation/js/functions/isBase64/page-1944ec5857576938.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isBase64",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isBase64",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isBase64 Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isBase64"}]," function checks if the input string is a valid Base64 string. It returns ",["$","code",null,{"children":"true"}]," if the string is a valid Base64, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isBase64 "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isBase64 "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check if it is a valid Base64 string."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the string is a valid Base64"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'SGVsbG8gV29ybGQh'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking a non-Base64 string"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'こんにちは'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking a non-Base64 string with digits"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4 - Checking a null value"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement83",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement94",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string. It checks if the string is a valid Base64 string using a regular expression. If the input is not a string or an empty string, it throws an error."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isBase64","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isBase64",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isBase64",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isBase64 Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isBase64"}]," function checks if the input string is a valid Base64 string. It returns ",["$","code",null,{"children":"true"}]," if the string is a valid Base64, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isBase64 "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isBase64 "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check if it is a valid Base64 string."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the string is a valid Base64"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'SGVsbG8gV29ybGQh'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking a non-Base64 string"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'こんにちは'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking a non-Base64 string with digits"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4 - Checking a null value"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement83",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#ffd700"},"children":["isBase64"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement94",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string. It checks if the string is a valid Base64 string using a regular expression. If the input is not a string or an empty string, it throws an error."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isBase64","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isCEP.html b/docs/page/documentation/js/functions/isCEP.html index 0e24f24..78fd4b0 100644 --- a/docs/page/documentation/js/functions/isCEP.html +++ b/docs/page/documentation/js/functions/isCEP.html @@ -1,4 +1,4 @@ -Documentation

isCEP Function Documentation

The isCEP function checks if the input string is a valid Brazilian ZIP Code (CEP). It returns true if the CEP is valid, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { IsCEP } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { IsCEP } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Checking if the CEP is valid with dashes
+Documentation

isCEP Function Documentation

The isCEP function checks if the input string is a valid Brazilian ZIP Code (CEP). It returns true if the CEP is valid, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { IsCEP } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { IsCEP } = require('multiform-validator');

Parameters

The function takes one parameter:

  • cep (string) - The input string to check if it is a valid Brazilian ZIP Code (CEP).

Examples

// Example 1 - Checking if the CEP is valid with dashes
 const result1 = isCEP('12345-678');
 console.log(result1); // true
 
@@ -8,4 +8,4 @@
 
 // Example 3 - Checking an invalid CEP with an incorrect format
 const result3 = isCEP('12.345-678');
-console.log(result3); // false

Notes

The function expects the input to be passed as a string.

\ No newline at end of file +
console.log(result3); // false

Notes

The function expects the input to be passed as a string.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isCEP.txt b/docs/page/documentation/js/functions/isCEP.txt index 38951bc..c59eb38 100644 --- a/docs/page/documentation/js/functions/isCEP.txt +++ b/docs/page/documentation/js/functions/isCEP.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","1706","static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-d9e6b59df33a0429.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","1706","static/chunks/app/(doc-session)/documentation/js/functions/isCEP/page-1b5946dd2af0fd6f.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCEP",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCEP",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isCEP Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isCEP"}]," function checks if the input string is a valid Brazilian ZIP Code (CEP). It returns ",["$","code",null,{"children":"true"}]," if the CEP is valid, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token imports maybe-class-name","style":{},"children":["IsCEP"]}],["$","span","code-segement5",{"className":"token imports","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token maybe-class-name","style":{},"children":["IsCEP"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement10",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement12",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cep"}]," (string) - The input string to check if it is a valid Brazilian ZIP Code (CEP)."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the CEP is valid with dashes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12345-678'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking if the CEP is valid without dashes"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'12345678'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking an invalid CEP with an incorrect format"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12.345-678'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input to be passed as a string."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isCEP","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCEP",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCEP",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isCEP Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isCEP"}]," function checks if the input string is a valid Brazilian ZIP Code (CEP). It returns ",["$","code",null,{"children":"true"}]," if the CEP is valid, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token imports maybe-class-name","style":{},"children":["IsCEP"]}],["$","span","code-segement5",{"className":"token imports","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token maybe-class-name","style":{},"children":["IsCEP"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement10",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement12",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cep"}]," (string) - The input string to check if it is a valid Brazilian ZIP Code (CEP)."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Checking if the CEP is valid with dashes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12345-678'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Checking if the CEP is valid without dashes"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'12345678'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Checking an invalid CEP with an incorrect format"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isCEP"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'12.345-678'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input to be passed as a string."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isCEP","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isCreditCardValid.html b/docs/page/documentation/js/functions/isCreditCardValid.html index 032d86a..937a664 100644 --- a/docs/page/documentation/js/functions/isCreditCardValid.html +++ b/docs/page/documentation/js/functions/isCreditCardValid.html @@ -1,4 +1,4 @@ -Documentation

isCreditCardValid Function Documentation

The isCreditCardValid function checks if the input string represents a valid credit card number using the Luhn algorithm. It returns true if the credit card number is valid, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isCreditCardValid } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isCreditCardValid } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid credit card number with spaces
+Documentation

isCreditCardValid Function Documentation

The isCreditCardValid function checks if the input string represents a valid credit card number using the Luhn algorithm. It returns true if the credit card number is valid, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isCreditCardValid } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isCreditCardValid } = require('multiform-validator');

Parameters

The function takes one parameter:

  • cardNumber (string) - The input string representing the credit card number to validate.

Examples

// Example 1 - Valid credit card number with spaces
 const result1 = isCreditCardValid('6062 8226 8644 9791');
 console.log(result1); // true
 
@@ -8,4 +8,4 @@
 
 // Example 3 - Invalid credit card number (does not pass the Luhn algorithm)
 const result3 = isCreditCardValid('1234 5678 9012 3456');
-console.log(result3); // false

Notes

The function expects the input value to be passed as a string representing a credit card number. It removes any non-digit characters and applies the Luhn algorithm to validate the credit card number. If the input is not a string, the function throws an error.

\ No newline at end of file +
console.log(result3); // false

Notes

The function expects the input value to be passed as a string representing a credit card number. It removes any non-digit characters and applies the Luhn algorithm to validate the credit card number. If the input is not a string, the function throws an error.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isCreditCardValid.txt b/docs/page/documentation/js/functions/isCreditCardValid.txt index 5db411f..c70e1ec 100644 --- a/docs/page/documentation/js/functions/isCreditCardValid.txt +++ b/docs/page/documentation/js/functions/isCreditCardValid.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4465","static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-1808abf5c48fa185.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4465","static/chunks/app/(doc-session)/documentation/js/functions/isCreditCardValid/page-c7c035359963b71f.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCreditCardValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCreditCardValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isCreditCardValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isCreditCardValid"}]," function checks if the input string represents a valid credit card number using the Luhn algorithm. It returns ",["$","code",null,{"children":"true"}]," if the credit card number is valid, and"," ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isCreditCardValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isCreditCardValid "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cardNumber"}]," (string) - The input string representing the credit card number to validate."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid credit card number with spaces"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'6062 8226 8644 9791'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Valid credit card number without spaces"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'6062822686449791'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Invalid credit card number (does not pass the Luhn algorithm)"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'1234 5678 9012 3456'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string representing a credit card number. It removes any non-digit characters and applies the Luhn algorithm to validate the credit card number. If the input is not a string, the function throws an error."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isCreditCardValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCreditCardValid",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isCreditCardValid",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isCreditCardValid Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isCreditCardValid"}]," function checks if the input string represents a valid credit card number using the Luhn algorithm. It returns ",["$","code",null,{"children":"true"}]," if the credit card number is valid, and"," ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isCreditCardValid "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isCreditCardValid "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"cardNumber"}]," (string) - The input string representing the credit card number to validate."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid credit card number with spaces"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'6062 8226 8644 9791'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Valid credit card number without spaces"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'6062822686449791'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Invalid credit card number (does not pass the Luhn algorithm)"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isCreditCardValid"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["'1234 5678 9012 3456'"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string representing a credit card number. It removes any non-digit characters and applies the Luhn algorithm to validate the credit card number. If the input is not a string, the function throws an error."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isCreditCardValid","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isDate.html b/docs/page/documentation/js/functions/isDate.html index 68a5c1e..c695daf 100644 --- a/docs/page/documentation/js/functions/isDate.html +++ b/docs/page/documentation/js/functions/isDate.html @@ -1,4 +1,4 @@ -Documentation

isDate Function Documentation

The isDate function checks if the input string is a valid date.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isDate } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isDate } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid date
+Documentation

isDate Function Documentation

The isDate function checks if the input string is a valid date.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isDate } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isDate } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string) - The input string representing the date

Examples

// Example 1 - Valid date
 const result1 = isDate("1999-12-31");
 console.log(result1); // true
 
@@ -8,4 +8,4 @@
 
 // Example 3 - Invalid date
 const result3 = isDate("1234 5678 9012 3456");
-console.log(result3); // false

Notes

The function expects the input value to be passed as a string.

\ No newline at end of file +
console.log(result3); // false

Notes

The function expects the input value to be passed as a string.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isDate.txt b/docs/page/documentation/js/functions/isDate.txt index 37090de..2ebc423 100644 --- a/docs/page/documentation/js/functions/isDate.txt +++ b/docs/page/documentation/js/functions/isDate.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8248","static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-5a92c9dd4bfc12ee.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8248","static/chunks/app/(doc-session)/documentation/js/functions/isDate/page-9f17668275456452.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDate",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDate",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isDate Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isDate"}]," function checks if the input string is a valid date."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isDate "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isDate "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string representing the date"]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid date"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["\"1999-12-31\""]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Valid date"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["\"2021-01-01\""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Invalid date"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["\"1234 5678 9012 3456\""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isDate","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDate",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDate",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isDate Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isDate"}]," function checks if the input string is a valid date."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isDate "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isDate "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string representing the date"]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid date"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["\"1999-12-31\""]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Valid date"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["\"2021-01-01\""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement42",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Invalid date"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#ffd700"},"children":["isDate"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"token","style":{"color":"#abe338"},"children":["\"1234 5678 9012 3456\""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement68",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isDate","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isDecimal.html b/docs/page/documentation/js/functions/isDecimal.html index 4f4c8ee..6f6663d 100644 --- a/docs/page/documentation/js/functions/isDecimal.html +++ b/docs/page/documentation/js/functions/isDecimal.html @@ -1,4 +1,4 @@ -Documentation

isDecimal Function Documentation

The isDecimal function checks if the input string or number represents a valid decimal number. It returns true if the value is a valid decimal number and follows one of the supported formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isDecimal } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isDecimal } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid decimal numbers
+Documentation

isDecimal Function Documentation

The isDecimal function checks if the input string or number represents a valid decimal number. It returns true if the value is a valid decimal number and follows one of the supported formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isDecimal } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isDecimal } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string|number) - The input value to check if it represents a valid decimal number.

Examples

// Example 1 - Valid decimal numbers
 const result1 = isDecimal('123.45');
 console.log(result1); // true
 
@@ -22,4 +22,4 @@
 console.log(result7); // false (not a valid number)
 
 const result8 = isDecimal('12.34.56');
-console.log(result8); // false (not a valid number)

Notes

The function expects the input value to be passed as a string or a number representing a decimal number. If the input is not a string or number, or an empty string, the function throws an error. It uses a regular expression to validate decimal numbers, supports both dot (.) and comma (,) as decimal separators, and checks for multiple decimal separators. Additionally, it performs checks for the negative sign to ensure it is only at the beginning of the value.

\ No newline at end of file +
console.log(result8); // false (not a valid number)

Notes

The function expects the input value to be passed as a string or a number representing a decimal number. If the input is not a string or number, or an empty string, the function throws an error. It uses a regular expression to validate decimal numbers, supports both dot (.) and comma (,) as decimal separators, and checks for multiple decimal separators. Additionally, it performs checks for the negative sign to ensure it is only at the beginning of the value.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isDecimal.txt b/docs/page/documentation/js/functions/isDecimal.txt index ce1e85c..970af35 100644 --- a/docs/page/documentation/js/functions/isDecimal.txt +++ b/docs/page/documentation/js/functions/isDecimal.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","1637","static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-78a2d8c27bd684ce.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","1637","static/chunks/app/(doc-session)/documentation/js/functions/isDecimal/page-baa685b8ca0bec7f.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDecimal",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDecimal",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isDecimal Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isDecimal"}]," function checks if the input string or number represents a valid decimal number. It returns ",["$","code",null,{"children":"true"}]," ","if the value is a valid decimal number and follows one of the supported formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isDecimal "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isDecimal "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string|number) - The input value to check if it represents a valid decimal number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid decimal numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'123.45'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'-123.45'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement39",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement45",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'0.123'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement60",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement62",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'1,234.56'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement83",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement85",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement91",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid decimal numbers"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'1.234,56'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement109",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement111",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement117",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid format)"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"token","style":{"color":"#abe338"},"children":["'abc'"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement132",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement134",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement140",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'12a.34'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement155",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement157",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement161",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement162",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement163",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'12.34.56'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement177",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement178",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement179",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement180",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement182",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement184",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement185",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement186",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string or a number representing a decimal number. If the input is not a string or number, or an empty string, the function throws an error. It uses a regular expression to validate decimal numbers, supports both dot (.) and comma (,) as decimal separators, and checks for multiple decimal separators. Additionally, it performs checks for the negative sign to ensure it is only at the beginning of the value."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isDecimal","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDecimal",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isDecimal",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isDecimal Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isDecimal"}]," function checks if the input string or number represents a valid decimal number. It returns ",["$","code",null,{"children":"true"}]," ","if the value is a valid decimal number and follows one of the supported formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isDecimal "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isDecimal "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string|number) - The input value to check if it represents a valid decimal number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid decimal numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'123.45'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'-123.45'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement39",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement45",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'0.123'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement60",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement62",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'1,234.56'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement83",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement85",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement91",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid decimal numbers"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'1.234,56'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement109",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement111",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement117",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid format)"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"token","style":{"color":"#abe338"},"children":["'abc'"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement132",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement134",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement140",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'12a.34'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement155",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement157",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement161",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement162",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement163",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isDecimal"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'12.34.56'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement177",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement178",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement179",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement180",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement182",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement184",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement185",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement186",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid number)"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input value to be passed as a string or a number representing a decimal number. If the input is not a string or number, or an empty string, the function throws an error. It uses a regular expression to validate decimal numbers, supports both dot (.) and comma (,) as decimal separators, and checks for multiple decimal separators. Additionally, it performs checks for the negative sign to ensure it is only at the beginning of the value."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isDecimal","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isEmail.html b/docs/page/documentation/js/functions/isEmail.html index 15e8708..06e8bfb 100644 --- a/docs/page/documentation/js/functions/isEmail.html +++ b/docs/page/documentation/js/functions/isEmail.html @@ -1,3 +1,3 @@ -Documentation

isEmail Function Documentation

The isEmail function checks if the input string is a valid email address. It returns true if the email address is valid and follows the supported format, and false otherwise.

This function just checks the syntax of the email to see if it's valid or not, if you need a stronger validation, use validateEmail

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isEmail } = require('multiform-validator');

Parameters

The function takes one parameter:

Example

// Example - Valid email address
+Documentation

isEmail Function Documentation

The isEmail function checks if the input string is a valid email address. It returns true if the email address is valid and follows the supported format, and false otherwise.

This function just checks the syntax of the email to see if it's valid or not, if you need a stronger validation, use validateEmail

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isEmail } = require('multiform-validator');

Parameters

The function takes one parameter:

  • email (string) - The input string representing the email address to validate.

Example

// Example - Valid email address
 const result1 = isEmail('foor@bar.com');
-console.log(result1); // true

Notes

The function expects the input email to be passed as a string. If the input is not a string, it will throw an error. If the email passed is an invalid email, it will return false.

\ No newline at end of file +
console.log(result1); // true

Notes

The function expects the input email to be passed as a string. If the input is not a string, it will throw an error. If the email passed is an invalid email, it will return false.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isEmail.txt b/docs/page/documentation/js/functions/isEmail.txt index 813021e..bad90aa 100644 --- a/docs/page/documentation/js/functions/isEmail.txt +++ b/docs/page/documentation/js/functions/isEmail.txt @@ -8,6 +8,6 @@ b:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 8:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 9:{"display":"inline-block"} a:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isEmail Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isEmail"}]," function checks if the input string is a valid email address. It returns ",["$","code",null,{"children":"true"}]," if the email address is valid and follows the supported format, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","p",null,{"children":["This function just checks the syntax of the email to see if it's valid or not, if you need a stronger validation, use"," ",["$","$L3",null,{"href":"./validateEmail","className":"nav-link","children":["$","code",null,{"children":"validateEmail"}]}]]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"email"}]," (string) - The input string representing the email address to validate."]}]}],["$","h2",null,{"className":"subtitle","children":"Example"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example - Valid email address"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isEmail"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'foor@bar.com'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input email to be passed as a string. If the input is not a string, it will throw an error. If the email passed is an invalid email, it will return ",["$","code",null,{"children":"false"}],"."]}]]}]]}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L6",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$7","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$8","children":"404"}],["$","div",null,{"style":"$9","children":["$","h2",null,{"style":"$a","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Lb",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lc"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isEmail Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isEmail"}]," function checks if the input string is a valid email address. It returns ",["$","code",null,{"children":"true"}]," if the email address is valid and follows the supported format, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","p",null,{"children":["This function just checks the syntax of the email to see if it's valid or not, if you need a stronger validation, use"," ",["$","$L3",null,{"href":"./validateEmail","className":"nav-link","children":["$","code",null,{"children":"validateEmail"}]}]]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"email"}]," (string) - The input string representing the email address to validate."]}]}],["$","h2",null,{"className":"subtitle","children":"Example"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example - Valid email address"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isEmail"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'foor@bar.com'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement16",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input email to be passed as a string. If the input is not a string, it will throw an error. If the email passed is an invalid email, it will return ",["$","code",null,{"children":"false"}],"."]}]]}]]}]],null],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L6",null,{}],["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$7","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$8","children":"404"}],["$","div",null,{"style":"$9","children":["$","h2",null,{"style":"$a","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$Lb",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lc"]]]] c:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isEmpty.html b/docs/page/documentation/js/functions/isEmpty.html index 022ca90..f79f2ce 100644 --- a/docs/page/documentation/js/functions/isEmpty.html +++ b/docs/page/documentation/js/functions/isEmpty.html @@ -1,4 +1,4 @@ -Documentation

isEmpty Function Documentation

The isEmpty function checks if the input string is empty or contains only whitespace characters. It returns true if the input string is empty or consists of only whitespace characters, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isEmpty } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isEmpty } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Empty or whitespace strings
+Documentation

isEmpty Function Documentation

The isEmpty function checks if the input string is empty or contains only whitespace characters. It returns true if the input string is empty or consists of only whitespace characters, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isEmpty } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isEmpty } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string) - The input string to check if it is empty or contains only whitespace characters.

Examples

// Example 1 - Empty or whitespace strings
 const result1 = isEmpty(''); // true
 console.log(result1);
 
@@ -17,4 +17,4 @@
 console.log(result5);
 
 const result6 = isEmpty(undefined);
-console.log(result6);

Notes

The function expects the input value to be passed as a string. If the input is not a string, the function throws a TypeError. It removes any leading and trailing whitespace from the input string using the trim() method and checks if the resulting string is empty (i.e., has a length of 0). If the input string consists of only whitespace characters, the function also returns true as it considers such strings to be empty.

\ No newline at end of file +
console.log(result6);

Notes

The function expects the input value to be passed as a string. If the input is not a string, the function throws a TypeError. It removes any leading and trailing whitespace from the input string using the trim() method and checks if the resulting string is empty (i.e., has a length of 0). If the input string consists of only whitespace characters, the function also returns true as it considers such strings to be empty.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isEmpty.txt b/docs/page/documentation/js/functions/isEmpty.txt index 8d34dc0..e31082b 100644 --- a/docs/page/documentation/js/functions/isEmpty.txt +++ b/docs/page/documentation/js/functions/isEmpty.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3956","static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-d9c434617df59242.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3956","static/chunks/app/(doc-session)/documentation/js/functions/isEmpty/page-11f47af6ae8278ff.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmpty",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmpty",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isEmpty Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isEmpty"}]," function checks if the input string is empty or contains only whitespace characters. It returns ",["$","code",null,{"children":"true"}]," ","if the input string is empty or consists of only whitespace characters, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isEmpty "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isEmpty "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check if it is empty or contains only whitespace characters."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Empty or whitespace strings"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["''"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["' '"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Non-empty strings"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement58",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement67",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["' Hello '"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Non-string inputs (will throw an error)"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement101",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement103",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement114",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement121",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement122",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement124",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement127",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement128",{"className":"token nil","style":{"color":"#00e0e0"},"children":["undefined"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement133",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement135",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input value to be passed as a string. If the input is not a string, the function throws a TypeError. It removes any leading and trailing whitespace from the input string using the"," ",["$","code",null,{"children":"trim()"}]," method and checks if the resulting string is empty (i.e., has a length of 0). If the input string consists of only whitespace characters, the function also returns ",["$","code",null,{"children":"true"}]," as it considers such strings to be empty."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isEmpty","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmpty",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isEmpty",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isEmpty Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isEmpty"}]," function checks if the input string is empty or contains only whitespace characters. It returns ",["$","code",null,{"children":"true"}]," ","if the input string is empty or consists of only whitespace characters, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isEmpty "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isEmpty "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string to check if it is empty or contains only whitespace characters."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Empty or whitespace strings"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["''"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["' '"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Non-empty strings"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement58",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement67",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["' Hello '"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Non-string inputs (will throw an error)"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement101",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement103",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement114",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement121",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement122",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement124",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#ffd700"},"children":["isEmpty"]}],["$","span","code-segement127",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement128",{"className":"token nil","style":{"color":"#00e0e0"},"children":["undefined"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement130",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement131",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement133",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement135",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function expects the input value to be passed as a string. If the input is not a string, the function throws a TypeError. It removes any leading and trailing whitespace from the input string using the"," ",["$","code",null,{"children":"trim()"}]," method and checks if the resulting string is empty (i.e., has a length of 0). If the input string consists of only whitespace characters, the function also returns ",["$","code",null,{"children":"true"}]," as it considers such strings to be empty."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isEmpty","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isMACAddress.html b/docs/page/documentation/js/functions/isMACAddress.html index 75ce969..be71e95 100644 --- a/docs/page/documentation/js/functions/isMACAddress.html +++ b/docs/page/documentation/js/functions/isMACAddress.html @@ -1,4 +1,4 @@ -Documentation

isMACAddress Function Documentation

The isMACAddress function checks if the input string is a valid MAC address. It returns true if the MAC address is valid and follows the supported formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isMACAddress } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isMACAddress } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid MAC addresses
+Documentation

isMACAddress Function Documentation

The isMACAddress function checks if the input string is a valid MAC address. It returns true if the MAC address is valid and follows the supported formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isMACAddress } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isMACAddress } = require('multiform-validator');

Parameters

The function takes one parameter:

  • mac (string) - The input string representing the MAC address to validate. The MAC address can be in the following formats: "001A2B3C4D5E", "00:1A:2B:3C:4D:5E", or "00-1A-2B-3C-4D-5E".

Examples

// Example 1 - Valid MAC addresses
 const result1 = isMACAddress('001A2B3C4D5E'); // true
 console.log(result1);
 
@@ -10,4 +10,4 @@
 
 // Example 2 - Invalid MAC address
 const result4 = isMACAddress('Hello'); // false
-console.log(result4);

Notes

The function expects the input MAC address to be passed as a string. If the input is not a string, the function throws a TypeError. It removes all non-alphanumeric characters from the input string using a regular expression and checks if the resulting string has a valid length (exactly 12 characters). Then, it uses another regular expression to verify if the cleaned MAC address matches the supported pattern. The supported pattern is a 12-character string consisting of hexadecimal digits (0-9, A-F, a-f), with optional separators (":", "-") between pairs of hexadecimal digits.

\ No newline at end of file +
console.log(result4);

Notes

The function expects the input MAC address to be passed as a string. If the input is not a string, the function throws a TypeError. It removes all non-alphanumeric characters from the input string using a regular expression and checks if the resulting string has a valid length (exactly 12 characters). Then, it uses another regular expression to verify if the cleaned MAC address matches the supported pattern. The supported pattern is a 12-character string consisting of hexadecimal digits (0-9, A-F, a-f), with optional separators (":", "-") between pairs of hexadecimal digits.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isMACAddress.txt b/docs/page/documentation/js/functions/isMACAddress.txt index 70eb715..07946e6 100644 --- a/docs/page/documentation/js/functions/isMACAddress.txt +++ b/docs/page/documentation/js/functions/isMACAddress.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","9852","static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-716d21fb6fcd90ed.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","9852","static/chunks/app/(doc-session)/documentation/js/functions/isMACAddress/page-1bcc12224bf12bdd.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMACAddress",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMACAddress",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isMACAddress Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isMACAddress"}]," function checks if the input string is a valid MAC address. It returns ",["$","code",null,{"children":"true"}]," if the MAC address is valid and follows the supported formats, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isMACAddress "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isMACAddress "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"mac"}]," (string) - The input string representing the MAC address to validate. The MAC address can be in the following formats: \"001A2B3C4D5E\", \"00:1A:2B:3C:4D:5E\", or \"00-1A-2B-3C-4D-5E\"."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid MAC addresses"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'001A2B3C4D5E'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'00:1A:2B:3C:4D:5E'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'00-1A-2B-3C-4D-5E'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid MAC address"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input MAC address to be passed as a string. If the input is not a string, the function throws a TypeError. It removes all non-alphanumeric characters from the input string using a regular expression and checks if the resulting string has a valid length (exactly 12 characters). Then, it uses another regular expression to verify if the cleaned MAC address matches the supported pattern. The supported pattern is a 12-character string consisting of hexadecimal digits (0-9, A-F, a-f), with optional separators (\":\", \"-\") between pairs of hexadecimal digits."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isMACAddress","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMACAddress",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMACAddress",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isMACAddress Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isMACAddress"}]," function checks if the input string is a valid MAC address. It returns ",["$","code",null,{"children":"true"}]," if the MAC address is valid and follows the supported formats, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isMACAddress "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isMACAddress "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"mac"}]," (string) - The input string representing the MAC address to validate. The MAC address can be in the following formats: \"001A2B3C4D5E\", \"00:1A:2B:3C:4D:5E\", or \"00-1A-2B-3C-4D-5E\"."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid MAC addresses"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'001A2B3C4D5E'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'00:1A:2B:3C:4D:5E'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'00-1A-2B-3C-4D-5E'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid MAC address"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isMACAddress"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input MAC address to be passed as a string. If the input is not a string, the function throws a TypeError. It removes all non-alphanumeric characters from the input string using a regular expression and checks if the resulting string has a valid length (exactly 12 characters). Then, it uses another regular expression to verify if the cleaned MAC address matches the supported pattern. The supported pattern is a 12-character string consisting of hexadecimal digits (0-9, A-F, a-f), with optional separators (\":\", \"-\") between pairs of hexadecimal digits."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isMACAddress","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isMD5.html b/docs/page/documentation/js/functions/isMD5.html index 553854b..568d067 100644 --- a/docs/page/documentation/js/functions/isMD5.html +++ b/docs/page/documentation/js/functions/isMD5.html @@ -1,4 +1,4 @@ -Documentation

isMD5 Function Documentation

The isMD5 function checks if the input string is a valid MD5 hash. It returns true if the input string is a valid MD5 hash and follows the supported format, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isMD5 } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isMD5 } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid MD5 hashes
+Documentation

isMD5 Function Documentation

The isMD5 function checks if the input string is a valid MD5 hash. It returns true if the input string is a valid MD5 hash and follows the supported format, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isMD5 } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isMD5 } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (string) - The input string representing the MD5 hash to validate. The MD5 hash should be a 32-character string consisting of hexadecimal digits (0-9, A-F, a-f).

Examples

// Example 1 - Valid MD5 hashes
 const result1 = isMD5('d41d8cd98f00b204e9800998ecf8427e'); // true
 console.log(result1);
 
@@ -13,4 +13,4 @@
 console.log(result4);
 
 const result5 = isMD5('d41d8cd98f00b204e9800998ecf8427e123'); // false
-console.log(result5);

Notes

The function expects the input MD5 hash to be passed as a string. If the input is not a string, the function throws a TypeError. It removes leading and trailing whitespace from the input string and checks if the resulting string has a valid length (exactly 32 characters). Then, it uses a regular expression to verify if the cleaned MD5 hash consists only of hexadecimal digits. Additionally, the function checks if the MD5 hash is not a known weak hash, such as "d41d8cd98f00b204e9800998ecf8427e". If any of the checks fail, the function returns false; otherwise, it returns true, indicating that the input string is a valid MD5 hash.

\ No newline at end of file +
console.log(result5);

Notes

The function expects the input MD5 hash to be passed as a string. If the input is not a string, the function throws a TypeError. It removes leading and trailing whitespace from the input string and checks if the resulting string has a valid length (exactly 32 characters). Then, it uses a regular expression to verify if the cleaned MD5 hash consists only of hexadecimal digits. Additionally, the function checks if the MD5 hash is not a known weak hash, such as "d41d8cd98f00b204e9800998ecf8427e". If any of the checks fail, the function returns false; otherwise, it returns true, indicating that the input string is a valid MD5 hash.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isMD5.txt b/docs/page/documentation/js/functions/isMD5.txt index 9ea6894..38312c7 100644 --- a/docs/page/documentation/js/functions/isMD5.txt +++ b/docs/page/documentation/js/functions/isMD5.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7099","static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-2909f27883115289.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7099","static/chunks/app/(doc-session)/documentation/js/functions/isMD5/page-5431f7f7d003c7eb.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMD5",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMD5",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isMD5 Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isMD5"}]," function checks if the input string is a valid MD5 hash. It returns ",["$","code",null,{"children":"true"}]," if the input string is a valid MD5 hash and follows the supported format, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isMD5 "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isMD5 "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string representing the MD5 hash to validate. The MD5 hash should be a 32-character string consisting of hexadecimal digits (0-9, A-F, a-f)."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid MD5 hashes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'d41d8cd98f00b204e9800998ecf8427e'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'6df23dc03f9b54cc38a0fc1483df6e21'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid MD5 hashes"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement58",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement67",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["'123'"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'d41d8cd98f00b204e9800998ecf8427e123'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement108",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement111",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement113",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input MD5 hash to be passed as a string. If the input is not a string, the function throws a TypeError. It removes leading and trailing whitespace from the input string and checks if the resulting string has a valid length (exactly 32 characters). Then, it uses a regular expression to verify if the cleaned MD5 hash consists only of hexadecimal digits. Additionally, the function checks if the MD5 hash is not a known weak hash, such as \"d41d8cd98f00b204e9800998ecf8427e\". If any of the checks fail, the function returns false; otherwise, it returns true, indicating that the input string is a valid MD5 hash."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isMD5","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMD5",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isMD5",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isMD5 Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isMD5"}]," function checks if the input string is a valid MD5 hash. It returns ",["$","code",null,{"children":"true"}]," if the input string is a valid MD5 hash and follows the supported format, and ",["$","code",null,{"children":"false"}]," ","otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isMD5 "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isMD5 "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string) - The input string representing the MD5 hash to validate. The MD5 hash should be a 32-character string consisting of hexadecimal digits (0-9, A-F, a-f)."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid MD5 hashes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'d41d8cd98f00b204e9800998ecf8427e'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'6df23dc03f9b54cc38a0fc1483df6e21'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid MD5 hashes"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement58",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement67",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#abe338"},"children":["'123'"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isMD5"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'d41d8cd98f00b204e9800998ecf8427e123'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement108",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement111",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement113",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function expects the input MD5 hash to be passed as a string. If the input is not a string, the function throws a TypeError. It removes leading and trailing whitespace from the input string and checks if the resulting string has a valid length (exactly 32 characters). Then, it uses a regular expression to verify if the cleaned MD5 hash consists only of hexadecimal digits. Additionally, the function checks if the MD5 hash is not a known weak hash, such as \"d41d8cd98f00b204e9800998ecf8427e\". If any of the checks fail, the function returns false; otherwise, it returns true, indicating that the input string is a valid MD5 hash."}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isMD5","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isNumber.html b/docs/page/documentation/js/functions/isNumber.html index 5a2c540..64c2f05 100644 --- a/docs/page/documentation/js/functions/isNumber.html +++ b/docs/page/documentation/js/functions/isNumber.html @@ -1,7 +1,7 @@ -Documentation

isNumber Function Documentation

The isNumber function checks if the input value is a valid number. It returns true if the value is a valid number, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isNumber } = require('multiform-validator');

Parameters

The function takes one parameter:

Examples

// Example 1 - Valid numbers
+Documentation

isNumber Function Documentation

The isNumber function checks if the input value is a valid number. It returns true if the value is a valid number, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isNumber } = require('multiform-validator');

Parameters

The function takes one parameter:

  • value (any) - The value to be checked if it represents a valid number.

Examples

// Example 1 - Valid numbers
 const result1 = isNumber(123); // true
 console.log(result1);
 
 // Example 2 - Not a valid number
 const result2 = isNumber('abc'); // false
-console.log(result2);

Notes

The function checks if the input value is not null, undefined, or a boolean type. If any of these conditions are met, the function returns false since these values cannot represent valid numbers. For all other types, the function uses the parseFloat function to convert the value to a floating-point number. If the conversion results in a valid number and the value is finite (not infinity or NaN), the function returns true, indicating that the input value is a valid number. Otherwise, it returns false.

\ No newline at end of file +
console.log(result2);

Notes

The function checks if the input value is not null, undefined, or a boolean type. If any of these conditions are met, the function returns false since these values cannot represent valid numbers. For all other types, the function uses the parseFloat function to convert the value to a floating-point number. If the conversion results in a valid number and the value is finite (not infinity or NaN), the function returns true, indicating that the input value is a valid number. Otherwise, it returns false.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isNumber.txt b/docs/page/documentation/js/functions/isNumber.txt index 5020082..a5564f0 100644 --- a/docs/page/documentation/js/functions/isNumber.txt +++ b/docs/page/documentation/js/functions/isNumber.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2739","static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-9460629b3c87adf4.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2739","static/chunks/app/(doc-session)/documentation/js/functions/isNumber/page-8c5ea3a4cbff9a68.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isNumber Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isNumber"}]," function checks if the input value is a valid number. It returns ",["$","code",null,{"children":"true"}]," if the value is a valid number, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (any) - The value to be checked if it represents a valid number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isNumber"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#00e0e0"},"children":["123"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Not a valid number"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isNumber"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'abc'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement42",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement44",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function checks if the input value is not null, undefined, or a boolean type. If any of these conditions are met, the function returns false since these values cannot represent valid numbers. For all other types, the function uses the ",["$","code",null,{"children":"parseFloat"}]," function to convert the value to a floating-point number. If the conversion results in a valid number and the value is finite (not infinity or NaN), the function returns true, indicating that the input value is a valid number. Otherwise, it returns false."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isNumber Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isNumber"}]," function checks if the input value is a valid number. It returns ",["$","code",null,{"children":"true"}]," if the value is a valid number, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (any) - The value to be checked if it represents a valid number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isNumber"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#00e0e0"},"children":["123"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Not a valid number"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token","style":{"color":"#ffd700"},"children":["isNumber"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'abc'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement42",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement44",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function checks if the input value is not null, undefined, or a boolean type. If any of these conditions are met, the function returns false since these values cannot represent valid numbers. For all other types, the function uses the ",["$","code",null,{"children":"parseFloat"}]," function to convert the value to a floating-point number. If the conversion results in a valid number and the value is finite (not infinity or NaN), the function returns true, indicating that the input value is a valid number. Otherwise, it returns false."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isPort.html b/docs/page/documentation/js/functions/isPort.html index 0c0306f..c8694e3 100644 --- a/docs/page/documentation/js/functions/isPort.html +++ b/docs/page/documentation/js/functions/isPort.html @@ -1,4 +1,4 @@ -Documentation

isPort Function Documentation

The isPort function checks if the input value represents a valid port number. It returns true if the value is a valid port number (within the range 1 to 65535), and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isPort } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isPort } = require('multiform-validator');

Parameters

The function takes one parameter that can be either a string or a number:

Examples

// Example 1 - Valid port numbers
+Documentation

isPort Function Documentation

The isPort function checks if the input value represents a valid port number. It returns true if the value is a valid port number (within the range 1 to 65535), and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isPort } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isPort } = require('multiform-validator');

Parameters

The function takes one parameter that can be either a string or a number:

  • value (string | number) - The value to be checked if it represents a valid port number.

Examples

// Example 1 - Valid port numbers
 const result1 = isPort('80'); // true
 console.log(result1);
 
@@ -17,4 +17,4 @@
 
 // Example 3 - Not a valid input value
 const result6 = isPort('Hello'); // false (not a valid port number)
-console.log(result6);

Notes

The function first checks if the input value is either a string or a number. If the value is a string, it is converted to an integer using parseInt(value, 10). If the conversion is successful (resulting in a valid integer), the function checks if the integer is within the valid port range (1 to 65535). If the value is within this range and it is an integer, the function returns true, indicating that the input value represents a valid port number. Otherwise, it returns false.

\ No newline at end of file +
console.log(result6);

Notes

The function first checks if the input value is either a string or a number. If the value is a string, it is converted to an integer using parseInt(value, 10). If the conversion is successful (resulting in a valid integer), the function checks if the integer is within the valid port range (1 to 65535). If the value is within this range and it is an integer, the function returns true, indicating that the input value represents a valid port number. Otherwise, it returns false.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isPort.txt b/docs/page/documentation/js/functions/isPort.txt index 0502dfd..289bc02 100644 --- a/docs/page/documentation/js/functions/isPort.txt +++ b/docs/page/documentation/js/functions/isPort.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6526","static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-95af2c9b7b9b3c64.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6526","static/chunks/app/(doc-session)/documentation/js/functions/isPort/page-551e4c64ae0936a2.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPort",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPort",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isPort Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isPort"}]," function checks if the input value represents a valid port number. It returns ",["$","code",null,{"children":"true"}]," if the value is a valid port number (within the range 1 to 65535), and"," ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isPort "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isPort "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter that can be either a string or a number:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string | number) - The value to be checked if it represents a valid port number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid port numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'80'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["443"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'65535'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Not valid port numbers"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (port number must be greater than 0)"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'65536'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement108",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (port number must be less than or equal to 65535)"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement111",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement113",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Not a valid input value"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement124",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement130",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement134",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid port number)"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement137",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement139",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement140",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function first checks if the input value is either a string or a number. If the value is a string, it is converted to an integer using"," ",["$","code",null,{"children":"parseInt(value, 10)"}],". If the conversion is successful (resulting in a valid integer), the function checks if the integer is within the valid port range (1 to 65535). If the value is within this range and it is an integer, the function returns true, indicating that the input value represents a valid port number. Otherwise, it returns false."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isPort","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPort",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPort",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isPort Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isPort"}]," function checks if the input value represents a valid port number. It returns ",["$","code",null,{"children":"true"}]," if the value is a valid port number (within the range 1 to 65535), and"," ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isPort "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isPort "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter that can be either a string or a number:"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"value"}]," (string | number) - The value to be checked if it represents a valid port number."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid port numbers"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'80'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["443"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'65535'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Not valid port numbers"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (port number must be greater than 0)"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement90",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement93",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement97",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement104",{"className":"token","style":{"color":"#abe338"},"children":["'65536'"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement108",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (port number must be less than or equal to 65535)"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement111",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement113",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Not a valid input value"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement124",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement126",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#ffd700"},"children":["isPort"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement130",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement134",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid port number)"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement137",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement139",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement140",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function first checks if the input value is either a string or a number. If the value is a string, it is converted to an integer using"," ",["$","code",null,{"children":"parseInt(value, 10)"}],". If the conversion is successful (resulting in a valid integer), the function checks if the integer is within the valid port range (1 to 65535). If the value is within this range and it is an integer, the function returns true, indicating that the input value represents a valid port number. Otherwise, it returns false."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isPort","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isPostalCode.html b/docs/page/documentation/js/functions/isPostalCode.html index ad72318..e4a5c2e 100644 --- a/docs/page/documentation/js/functions/isPostalCode.html +++ b/docs/page/documentation/js/functions/isPostalCode.html @@ -1,4 +1,4 @@ -Documentation

isPostalCode Function Documentation

The isPostalCode function checks if the input value represents a valid postal code for supported countries. It returns true if the value matches the postal code format for any of the supported countries, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isPostalCode } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isPostalCode } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the postal code to be checked.

Supported Countries

The function supports postal codes for the following countries:

Examples

// Example 1 - Valid postal codes
+Documentation

isPostalCode Function Documentation

The isPostalCode function checks if the input value represents a valid postal code for supported countries. It returns true if the value matches the postal code format for any of the supported countries, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isPostalCode } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isPostalCode } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the postal code to be checked.

  • postalCode (string) - The postal code to be checked for validity.

Supported Countries

The function supports postal codes for the following countries:

  • United States
  • Canada
  • United Kingdom
  • France
  • Netherlands
  • Japan
  • Spain
  • South Africa
  • Germany
  • Switzerland
  • Brazil
  • Italy

Examples

// Example 1 - Valid postal codes
 const result1 = isPostalCode('12345'); // true (United States)
 console.log(result1);
 
@@ -41,4 +41,4 @@
 
 // Example 3 - Not a valid postal code
 const result14 = isPostalCode('Hello'); // false (not a valid postal code)
-console.log(result14);

Notes

The function uses regular expressions to check the input postal code against supported 'countries' postal code formats. It returns true if the input value matches any of the supported postal code formats, and false otherwise.

\ No newline at end of file +
console.log(result14);

Notes

The function uses regular expressions to check the input postal code against supported 'countries' postal code formats. It returns true if the input value matches any of the supported postal code formats, and false otherwise.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isPostalCode.txt b/docs/page/documentation/js/functions/isPostalCode.txt index 199a1b3..55ade5e 100644 --- a/docs/page/documentation/js/functions/isPostalCode.txt +++ b/docs/page/documentation/js/functions/isPostalCode.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4653","static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-7df12cb76abe1db1.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4653","static/chunks/app/(doc-session)/documentation/js/functions/isPostalCode/page-b110b25710550e59.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPostalCode",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPostalCode",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isPostalCode Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isPostalCode"}]," function checks if the input value represents a valid postal code for supported countries. It returns"," ",["$","code",null,{"children":"true"}]," if the value matches the postal code format for any of the supported countries, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isPostalCode "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isPostalCode "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the postal code to be checked."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"postalCode"}]," (string) - The postal code to be checked for validity."]}]}],["$","h2",null,{"className":"subtitle","children":"Supported Countries"}],["$","p",null,{"children":"The function supports postal codes for the following countries:"}],["$","ul",null,{"children":[["$","li",null,{"children":"United States"}],["$","li",null,{"children":"Canada"}],["$","li",null,{"children":"United Kingdom"}],["$","li",null,{"children":"France"}],["$","li",null,{"children":"Netherlands"}],["$","li",null,{"children":"Japan"}],["$","li",null,{"children":"Spain"}],["$","li",null,{"children":"South Africa"}],["$","li",null,{"children":"Germany"}],["$","li",null,{"children":"Switzerland"}],["$","li",null,{"children":"Brazil"}],["$","li",null,{"children":"Italy"}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid postal codes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United States)"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'M4B 1B3'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Canada)"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'SW1A 1AA'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United Kingdom)"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'75013'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (France)"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement85",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement87",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement97",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement99",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement101",{"className":"token","style":{"color":"#abe338"},"children":["'1012'"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Netherlands)"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement122",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement124",{"className":"token","style":{"color":"#abe338"},"children":["'100-0001'"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Japan)"]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement131",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement133",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement138",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement140",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement141",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid postal codes"]}],["$","span","code-segement142",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'28001'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement154",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Spain)"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement157",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement159",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement161",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'8000'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement177",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (South Africa)"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement182",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement184",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement186",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement187",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement192",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement193",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement194",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement195",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement196",{"className":"token","style":{"color":"#abe338"},"children":["'13355'"]}],["$","span","code-segement197",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Germany)"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement203",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement205",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement207",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement209",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement210",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement212",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement213",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":[" result10 "]}],["$","span","code-segement215",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement216",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement217",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement218",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement219",{"className":"token","style":{"color":"#abe338"},"children":["'1002'"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement221",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement223",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Switzerland)"]}],["$","span","code-segement224",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement225",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement226",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement227",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement228",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement229",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement230",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement231",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement232",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement233",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement235",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement236",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement237",{"className":"$undefined","style":{},"children":[" result11 "]}],["$","span","code-segement238",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement239",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement240",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement241",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement242",{"className":"token","style":{"color":"#abe338"},"children":["'10045-123'"]}],["$","span","code-segement243",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement244",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement245",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement246",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Brazil)"]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement248",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement249",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement250",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement251",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement253",{"className":"$undefined","style":{},"children":["result11"]}],["$","span","code-segement254",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement255",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement256",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement258",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement259",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement260",{"className":"$undefined","style":{},"children":[" result12 "]}],["$","span","code-segement261",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement262",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement263",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement264",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement265",{"className":"token","style":{"color":"#abe338"},"children":["'00100'"]}],["$","span","code-segement266",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement267",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement268",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement269",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Italy)"]}],["$","span","code-segement270",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement272",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement274",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement275",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement276",{"className":"$undefined","style":{},"children":["result12"]}],["$","span","code-segement277",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement278",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement279",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement281",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement282",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement283",{"className":"$undefined","style":{},"children":[" result13 "]}],["$","span","code-segement284",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement286",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement287",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement288",{"className":"token","style":{"color":"#abe338"},"children":["'90210'"]}],["$","span","code-segement289",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement290",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement291",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement292",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United States ZIP Code)"]}],["$","span","code-segement293",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement294",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement295",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement296",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement297",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement298",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement299",{"className":"$undefined","style":{},"children":["result13"]}],["$","span","code-segement300",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement302",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement304",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement305",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Not a valid postal code"]}],["$","span","code-segement306",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement307",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement308",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement309",{"className":"$undefined","style":{},"children":[" result14 "]}],["$","span","code-segement310",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement311",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement312",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement313",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement314",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement315",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement316",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement317",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement318",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid postal code)"]}],["$","span","code-segement319",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement320",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement321",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement322",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement323",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement324",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":["result14"]}],["$","span","code-segement326",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement327",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function uses regular expressions to check the input postal code against supported 'countries' postal code formats. It returns ",["$","code",null,{"children":"true"}]," if the input value matches any of the supported postal code formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isPostalCode","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPostalCode",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isPostalCode",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isPostalCode Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isPostalCode"}]," function checks if the input value represents a valid postal code for supported countries. It returns"," ",["$","code",null,{"children":"true"}]," if the value matches the postal code format for any of the supported countries, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isPostalCode "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isPostalCode "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the postal code to be checked."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"postalCode"}]," (string) - The postal code to be checked for validity."]}]}],["$","h2",null,{"className":"subtitle","children":"Supported Countries"}],["$","p",null,{"children":"The function supports postal codes for the following countries:"}],["$","ul",null,{"children":[["$","li",null,{"children":"United States"}],["$","li",null,{"children":"Canada"}],["$","li",null,{"children":"United Kingdom"}],["$","li",null,{"children":"France"}],["$","li",null,{"children":"Netherlands"}],["$","li",null,{"children":"Japan"}],["$","li",null,{"children":"Spain"}],["$","li",null,{"children":"South Africa"}],["$","li",null,{"children":"Germany"}],["$","li",null,{"children":"Switzerland"}],["$","li",null,{"children":"Brazil"}],["$","li",null,{"children":"Italy"}]]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid postal codes"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12345'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United States)"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'M4B 1B3'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Canada)"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'SW1A 1AA'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United Kingdom)"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'75013'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (France)"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement85",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement87",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement97",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement99",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement101",{"className":"token","style":{"color":"#abe338"},"children":["'1012'"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Netherlands)"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement122",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement124",{"className":"token","style":{"color":"#abe338"},"children":["'100-0001'"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Japan)"]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement131",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement133",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement138",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement140",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement141",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid postal codes"]}],["$","span","code-segement142",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'28001'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement154",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Spain)"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement157",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement159",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement161",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'8000'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement177",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (South Africa)"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement182",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement184",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement186",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement187",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement192",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement193",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement194",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement195",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement196",{"className":"token","style":{"color":"#abe338"},"children":["'13355'"]}],["$","span","code-segement197",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Germany)"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement203",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement205",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement207",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement209",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement210",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement212",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement213",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":[" result10 "]}],["$","span","code-segement215",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement216",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement217",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement218",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement219",{"className":"token","style":{"color":"#abe338"},"children":["'1002'"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement221",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement223",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Switzerland)"]}],["$","span","code-segement224",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement225",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement226",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement227",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement228",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement229",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement230",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement231",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement232",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement233",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement235",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement236",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement237",{"className":"$undefined","style":{},"children":[" result11 "]}],["$","span","code-segement238",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement239",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement240",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement241",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement242",{"className":"token","style":{"color":"#abe338"},"children":["'10045-123'"]}],["$","span","code-segement243",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement244",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement245",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement246",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Brazil)"]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement248",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement249",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement250",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement251",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement253",{"className":"$undefined","style":{},"children":["result11"]}],["$","span","code-segement254",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement255",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement256",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement258",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement259",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement260",{"className":"$undefined","style":{},"children":[" result12 "]}],["$","span","code-segement261",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement262",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement263",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement264",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement265",{"className":"token","style":{"color":"#abe338"},"children":["'00100'"]}],["$","span","code-segement266",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement267",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement268",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement269",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (Italy)"]}],["$","span","code-segement270",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement272",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement274",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement275",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement276",{"className":"$undefined","style":{},"children":["result12"]}],["$","span","code-segement277",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement278",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement279",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement281",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement282",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement283",{"className":"$undefined","style":{},"children":[" result13 "]}],["$","span","code-segement284",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement286",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement287",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement288",{"className":"token","style":{"color":"#abe338"},"children":["'90210'"]}],["$","span","code-segement289",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement290",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement291",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement292",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true (United States ZIP Code)"]}],["$","span","code-segement293",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement294",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement295",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement296",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement297",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement298",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement299",{"className":"$undefined","style":{},"children":["result13"]}],["$","span","code-segement300",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement302",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement304",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement305",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3 - Not a valid postal code"]}],["$","span","code-segement306",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement307",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement308",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement309",{"className":"$undefined","style":{},"children":[" result14 "]}],["$","span","code-segement310",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement311",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement312",{"className":"token","style":{"color":"#ffd700"},"children":["isPostalCode"]}],["$","span","code-segement313",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement314",{"className":"token","style":{"color":"#abe338"},"children":["'Hello'"]}],["$","span","code-segement315",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement316",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement317",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement318",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (not a valid postal code)"]}],["$","span","code-segement319",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement320",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement321",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement322",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement323",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement324",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":["result14"]}],["$","span","code-segement326",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement327",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function uses regular expressions to check the input postal code against supported 'countries' postal code formats. It returns ",["$","code",null,{"children":"true"}]," if the input value matches any of the supported postal code formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isPostalCode","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isTime.html b/docs/page/documentation/js/functions/isTime.html index 2e8e74f..82934a9 100644 --- a/docs/page/documentation/js/functions/isTime.html +++ b/docs/page/documentation/js/functions/isTime.html @@ -1,4 +1,4 @@ -Documentation

isTime Function Documentation

The isTime function checks if the input value represents a valid time in the format "hh:mm" or "hh:mm AM/PM" or "hh:mm:ss" or "hh:mm:ss AM/PM". It returns true if the value matches any of these formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isTime } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isTime } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the time to be checked.

Examples

// Example 1 - Valid time formats
+Documentation

isTime Function Documentation

The isTime function checks if the input value represents a valid time in the format "hh:mm" or "hh:mm AM/PM" or "hh:mm:ss" or "hh:mm:ss AM/PM". It returns true if the value matches any of these formats, and false otherwise.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { isTime } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { isTime } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the time to be checked.

  • time (string) - The time to be checked for validity. It must be in one of the supported formats: "hh:mm", "hh:mm AM/PM", "hh:mm:ss", or "hh:mm:ss AM/PM".

Examples

// Example 1 - Valid time formats
 const result1 = isTime('12:34'); // true
 console.log(result1);
 
@@ -25,4 +25,4 @@
 console.log(result8);
 
 const result9 = isTime('23:59:61'); // false (invalid second)
-console.log(result9);

Notes

The function uses a regular expression to check if the input time string matches any of the supported time formats. It returns true if the input value matches any of the supported formats, and false otherwise.

\ No newline at end of file +
console.log(result9);

Notes

The function uses a regular expression to check if the input time string matches any of the supported time formats. It returns true if the input value matches any of the supported formats, and false otherwise.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isTime.txt b/docs/page/documentation/js/functions/isTime.txt index 7bd4ae7..04f8f3c 100644 --- a/docs/page/documentation/js/functions/isTime.txt +++ b/docs/page/documentation/js/functions/isTime.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8230","static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-82211b32481000d4.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8230","static/chunks/app/(doc-session)/documentation/js/functions/isTime/page-908653a54fa3c7ae.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isTime",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isTime",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isTime Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isTime"}]," function checks if the input value represents a valid time in the format \"hh:mm\" or \"hh:mm AM/PM\" or \"hh:mm:ss\" or \"hh:mm:ss AM/PM\". It returns ",["$","code",null,{"children":"true"}]," if the value matches any of these formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isTime "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isTime "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the time to be checked."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"time"}]," (string) - The time to be checked for validity. It must be in one of the supported formats: \"hh:mm\", \"hh:mm AM/PM\", \"hh:mm:ss\", or \"hh:mm:ss AM/PM\"."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid time formats"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12:34'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'12:34 AM'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'23:59:59'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56 PM'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement85",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement87",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement97",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement99",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement101",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56 AM'"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid time formats"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56XM'"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid format)"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement134",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement136",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement138",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement140",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'25:00'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement154",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid hour)"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement157",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement159",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement161",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'23:60'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement177",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid minute)"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement182",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement184",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement186",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement187",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement192",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement193",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement194",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement195",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement196",{"className":"token","style":{"color":"#abe338"},"children":["'23:59:61'"]}],["$","span","code-segement197",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid second)"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement203",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement205",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement207",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement209",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function uses a regular expression to check if the input time string matches any of the supported time formats. It returns"," ",["$","code",null,{"children":"true"}]," if the input value matches any of the supported formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isTime","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isTime",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isTime",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"isTime Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isTime"}]," function checks if the input value represents a valid time in the format \"hh:mm\" or \"hh:mm AM/PM\" or \"hh:mm:ss\" or \"hh:mm:ss AM/PM\". It returns ",["$","code",null,{"children":"true"}]," if the value matches any of these formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isTime "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" isTime "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the time to be checked."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"time"}]," (string) - The time to be checked for validity. It must be in one of the supported formats: \"hh:mm\", \"hh:mm AM/PM\", \"hh:mm:ss\", or \"hh:mm:ss AM/PM\"."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1 - Valid time formats"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement5",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement9",{"className":"token","style":{"color":"#abe338"},"children":["'12:34'"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement16",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement18",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'12:34 AM'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement41",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement51",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement53",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement55",{"className":"token","style":{"color":"#abe338"},"children":["'23:59:59'"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement64",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement71",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement78",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56 PM'"]}],["$","span","code-segement79",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement85",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement87",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement94",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement95",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement97",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement99",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement101",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56 AM'"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement110",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement117",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement118",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2 - Invalid time formats"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement120",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement121",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement123",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement125",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement127",{"className":"token","style":{"color":"#abe338"},"children":["'12:34:56XM'"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid format)"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement134",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement136",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement138",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement140",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement143",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement145",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement146",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement148",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement150",{"className":"token","style":{"color":"#abe338"},"children":["'25:00'"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement154",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid hour)"]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement157",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement159",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement161",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement166",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement167",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement168",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement173",{"className":"token","style":{"color":"#abe338"},"children":["'23:60'"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement176",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement177",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid minute)"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement182",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement183",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement184",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement186",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement187",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement192",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement193",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement194",{"className":"token","style":{"color":"#ffd700"},"children":["isTime"]}],["$","span","code-segement195",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement196",{"className":"token","style":{"color":"#abe338"},"children":["'23:59:61'"]}],["$","span","code-segement197",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token","style":{"color":"#d4d0ab"},"children":["// false (invalid second)"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement203",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement205",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement207",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement209",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":["The function uses a regular expression to check if the input time string matches any of the supported time formats. It returns"," ",["$","code",null,{"children":"true"}]," if the input value matches any of the supported formats, and ",["$","code",null,{"children":"false"}]," otherwise."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isTime","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isValidAudio.html b/docs/page/documentation/js/functions/isValidAudio.html index 2453767..7153b7b 100644 --- a/docs/page/documentation/js/functions/isValidAudio.html +++ b/docs/page/documentation/js/functions/isValidAudio.html @@ -1,7 +1,7 @@ -Documentation

How to use the isValidAudio function

The isValidAudio function is used to check whether an audio file is valid or not. It accepts a Buffer as an argument.

import { isValidAudio } from 'multiform-validator';
+Documentation

How to use the isValidAudio function

The isValidAudio function is used to check whether an audio file is valid or not. It accepts a Buffer as an argument.

import { isValidAudio } from 'multiform-validator';
 import AudioBuffer from 'audio-buffer';
 
 const buffer: Buffer = AudioBuffer;
 const isValid = isValidAudio(buffer);
 
-console.log(isValid);  // true if the audio is valid, false otherwise
\ No newline at end of file +console.log(isValid); // true if the audio is valid, false otherwise
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isValidAudio.txt b/docs/page/documentation/js/functions/isValidAudio.txt index 29b412d..d5594e9 100644 --- a/docs/page/documentation/js/functions/isValidAudio.txt +++ b/docs/page/documentation/js/functions/isValidAudio.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8685","static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-a054e8d21eabac0d.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8685","static/chunks/app/(doc-session)/documentation/js/functions/isValidAudio/page-8633e5b3237090b7.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidAudio",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidAudio",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidAudio function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidAudio"}]," function is used to check whether an audio file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidAudio "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["AudioBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'audio-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["AudioBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidAudio"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the audio is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidAudio","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidAudio",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidAudio",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidAudio function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidAudio"}]," function is used to check whether an audio file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidAudio "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["AudioBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'audio-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["AudioBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidAudio"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the audio is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidAudio","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isValidImage.html b/docs/page/documentation/js/functions/isValidImage.html index bdae927..e652cba 100644 --- a/docs/page/documentation/js/functions/isValidImage.html +++ b/docs/page/documentation/js/functions/isValidImage.html @@ -1,4 +1,4 @@ -Documentation

How to use the isValidImage function

The isValidImage function is used to check whether an image file is valid or not. It accepts a Buffer as an argument.

import { isValidImage } from 'multiform-validator';
+Documentation

How to use the isValidImage function

The isValidImage function is used to check whether an image file is valid or not. It accepts a Buffer as an argument.

import { isValidImage } from 'multiform-validator';
 import ImageBuffer from 'image-buffer';
 
 const buffer: Buffer = ImageBuffer;
@@ -19,4 +19,4 @@
 if (!isValidImageResult) {
     fs.unlinkSync(fileGetted);
     throw new BadRequestException('Invalid image');
-}

First, import the isValidImage function from 'multiform-validator'. Then, define the path to the image you want to check. Call the isValidImage function with the image path as an argument. The function will return true if the image is valid and false if it is not.

\ No newline at end of file +
}

First, import the isValidImage function from 'multiform-validator'. Then, define the path to the image you want to check. Call the isValidImage function with the image path as an argument. The function will return true if the image is valid and false if it is not.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isValidImage.txt b/docs/page/documentation/js/functions/isValidImage.txt index 1b9ee82..f363717 100644 --- a/docs/page/documentation/js/functions/isValidImage.txt +++ b/docs/page/documentation/js/functions/isValidImage.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7357","static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-a37f33ab8af11f0c.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7357","static/chunks/app/(doc-session)/documentation/js/functions/isValidImage/page-d57eb01d47e4b9ac.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidImage",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidImage",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidImage function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidImage"}]," function is used to check whether an image file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidImage "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["ImageBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'image-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["ImageBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidImage"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the image is valid, false otherwise"]}]]]}]}],["$","h2",null,{"className":"mt-6","children":"Example Usage with Nestjs and Multer"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" filePath "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["resolve"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["process"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement8",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["cwd"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#abe338"},"children":["'public'"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token","style":{"color":"#abe338"},"children":["'assets'"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'images'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" fileGetted "]}],["$","span","code-segement27",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token","style":{"color":"#ffd700"},"children":["resolve"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["filePath"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" filename"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" buffer "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement43",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement45",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["alloc"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement47",{"className":"token","style":{"color":"#00e0e0"},"children":["4"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement52",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" fd "]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" fs"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement58",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["openSync"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["fileGetted"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["'r'"]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["fs"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement69",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["readSync"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":["fd"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" buffer"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["4"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["fs"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement88",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["closeSync"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["fd"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement95",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" isValidImageResult "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#ffd700"},"children":["isValidImage"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["if"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement111",{"className":"token","style":{"color":"#00e0e0"},"children":["!"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["isValidImageResult"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[" fs"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement119",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["unlinkSync"]}],["$","span","code-segement120",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":["fileGetted"]}],["$","span","code-segement122",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["throw"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#00e0e0"},"children":["new"]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement130",{"className":"token class-name","style":{},"children":["BadRequestException"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement132",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid image'"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}]]]}]}],["$","p",null,{"children":["First, import the ",["$","code",null,{"children":"isValidImage"}]," function from 'multiform-validator'. Then, define the path to the image you want to check. Call the ",["$","code",null,{"children":"isValidImage"}]," function with the image path as an argument. The function will return"," ",["$","code",null,{"children":"true"}]," if the image is valid and ",["$","code",null,{"children":"false"}]," if it is not."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidImage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidImage",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidImage",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidImage function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidImage"}]," function is used to check whether an image file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidImage "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["ImageBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'image-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["ImageBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidImage"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the image is valid, false otherwise"]}]]]}]}],["$","h2",null,{"className":"mt-6","children":"Example Usage with Nestjs and Multer"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" filePath "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["resolve"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["process"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement8",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["cwd"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement13",{"className":"token","style":{"color":"#abe338"},"children":["'public'"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token","style":{"color":"#abe338"},"children":["'assets'"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'images'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement24",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" fileGetted "]}],["$","span","code-segement27",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token","style":{"color":"#ffd700"},"children":["resolve"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["filePath"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" filename"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement38",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" buffer "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement43",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement45",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["alloc"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement47",{"className":"token","style":{"color":"#00e0e0"},"children":["4"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement52",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" fd "]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" fs"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement58",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["openSync"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["fileGetted"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["'r'"]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["fs"]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement69",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["readSync"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":["fd"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" buffer"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["4"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":["0"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["fs"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement88",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["closeSync"]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["fd"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement95",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" isValidImageResult "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#ffd700"},"children":["isValidImage"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["if"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement111",{"className":"token","style":{"color":"#00e0e0"},"children":["!"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":["isValidImageResult"]}],["$","span","code-segement113",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[" fs"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement119",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["unlinkSync"]}],["$","span","code-segement120",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":["fileGetted"]}],["$","span","code-segement122",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement125",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement126",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["throw"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement128",{"className":"token","style":{"color":"#00e0e0"},"children":["new"]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement130",{"className":"token class-name","style":{},"children":["BadRequestException"]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement132",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid image'"]}],["$","span","code-segement133",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement137",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}]]]}]}],["$","p",null,{"children":["First, import the ",["$","code",null,{"children":"isValidImage"}]," function from 'multiform-validator'. Then, define the path to the image you want to check. Call the ",["$","code",null,{"children":"isValidImage"}]," function with the image path as an argument. The function will return"," ",["$","code",null,{"children":"true"}]," if the image is valid and ",["$","code",null,{"children":"false"}]," if it is not."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidImage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isValidPdf.html b/docs/page/documentation/js/functions/isValidPdf.html index a5455e0..b365ab2 100644 --- a/docs/page/documentation/js/functions/isValidPdf.html +++ b/docs/page/documentation/js/functions/isValidPdf.html @@ -1,7 +1,7 @@ -Documentation

How to use the isValidPdf function

The isValidPdf function is used to check whether an pdf file is valid or not. It accepts a Buffer as an argument.

import { isValidPdf } from 'multiform-validator';
+Documentation

How to use the isValidPdf function

The isValidPdf function is used to check whether an pdf file is valid or not. It accepts a Buffer as an argument.

import { isValidPdf } from 'multiform-validator';
 import PdfBuffer from 'pdf-buffer';
 
 const buffer: Buffer = PdfBuffer;
 const isValid = isValidPdf(buffer);
 
-console.log(isValid);  // true if the pdf is valid, false otherwise
\ No newline at end of file +console.log(isValid); // true if the pdf is valid, false otherwise
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isValidPdf.txt b/docs/page/documentation/js/functions/isValidPdf.txt index fc05a7f..e41e615 100644 --- a/docs/page/documentation/js/functions/isValidPdf.txt +++ b/docs/page/documentation/js/functions/isValidPdf.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3981","static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-5566a06d06dad928.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3981","static/chunks/app/(doc-session)/documentation/js/functions/isValidPdf/page-53d006cdbdc0470b.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidPdf",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidPdf",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidPdf function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidPdf"}]," function is used to check whether an pdf file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidPdf "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["PdfBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'pdf-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["PdfBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidPdf"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the pdf is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidPdf","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidPdf",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidPdf",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidPdf function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidPdf"}]," function is used to check whether an pdf file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidPdf "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["PdfBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'pdf-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["PdfBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidPdf"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the pdf is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidPdf","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isValidTxt.html b/docs/page/documentation/js/functions/isValidTxt.html index 4940c2f..b3fc619 100644 --- a/docs/page/documentation/js/functions/isValidTxt.html +++ b/docs/page/documentation/js/functions/isValidTxt.html @@ -1,7 +1,7 @@ -Documentation

How to use the isValidTxt function

The isValidTxt function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument.

import { isValidTxt } from 'multiform-validator';
+Documentation

How to use the isValidTxt function

The isValidTxt function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument.

import { isValidTxt } from 'multiform-validator';
 import TxtBuffer from 'txt-buffer';
 
 const buffer: Buffer = TxtBuffer;
 const isValid = isValidTxt(buffer);
 
-console.log(isValid);  // true if the txt is valid, false otherwise
\ No newline at end of file +console.log(isValid); // true if the txt is valid, false otherwise
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isValidTxt.txt b/docs/page/documentation/js/functions/isValidTxt.txt index 1147125..d7b861e 100644 --- a/docs/page/documentation/js/functions/isValidTxt.txt +++ b/docs/page/documentation/js/functions/isValidTxt.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4885","static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-6539535225ae961b.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","4885","static/chunks/app/(doc-session)/documentation/js/functions/isValidTxt/page-9b77b98965d1a31e.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidTxt",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidTxt",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidTxt function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidTxt"}]," function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidTxt "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["TxtBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'txt-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["TxtBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidTxt"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the txt is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidTxt","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidTxt",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidTxt",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidTxt function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidTxt"}]," function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidTxt "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["TxtBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'txt-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["TxtBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidTxt"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the txt is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidTxt","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/isValidVideo.html b/docs/page/documentation/js/functions/isValidVideo.html index 44f8c93..884bffe 100644 --- a/docs/page/documentation/js/functions/isValidVideo.html +++ b/docs/page/documentation/js/functions/isValidVideo.html @@ -1,7 +1,7 @@ -Documentation

How to use the isValidVideo function

The isValidVideo function is used to check whether an video file is valid or not. It accepts a Buffer as an argument.

import { isValidVideo } from 'multiform-validator';
+Documentation

How to use the isValidVideo function

The isValidVideo function is used to check whether an video file is valid or not. It accepts a Buffer as an argument.

import { isValidVideo } from 'multiform-validator';
 import VideoBuffer from 'video-buffer';
 
 const buffer: Buffer = VideoBuffer;
 const isValid = isValidVideo(buffer);
 
-console.log(isValid);  // true if the video is valid, false otherwise
\ No newline at end of file +console.log(isValid); // true if the video is valid, false otherwise
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/isValidVideo.txt b/docs/page/documentation/js/functions/isValidVideo.txt index b904cdd..4b8e6d1 100644 --- a/docs/page/documentation/js/functions/isValidVideo.txt +++ b/docs/page/documentation/js/functions/isValidVideo.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","5236","static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bb6447d6e13aaeae.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","5236","static/chunks/app/(doc-session)/documentation/js/functions/isValidVideo/page-bd7d356bc3eec3b5.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidVideo",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidVideo",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidVideo function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidVideo"}]," function is used to check whether an video file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidVideo "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["VideoBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'video-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["VideoBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidVideo"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the video is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidVideo","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidVideo",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["isValidVideo",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid","children":[["$","h1",null,{"children":"How to use the isValidVideo function"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"isValidVideo"}]," function is used to check whether an video file is valid or not. It accepts a Buffer as an argument."]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" isValidVideo "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement12",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token imports maybe-class-name","style":{},"children":["VideoBuffer"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#abe338"},"children":["'video-buffer'"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["buffer"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token maybe-class-name","style":{},"children":["Buffer"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token maybe-class-name","style":{},"children":["VideoBuffer"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" isValid "]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#ffd700"},"children":["isValidVideo"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["buffer"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement47",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement48",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement50",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["isValid"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#d4d0ab"},"children":["// true if the video is valid, false otherwise"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","isValidVideo","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/passwordStrengthTester.html b/docs/page/documentation/js/functions/passwordStrengthTester.html index fed3f60..611ae6e 100644 --- a/docs/page/documentation/js/functions/passwordStrengthTester.html +++ b/docs/page/documentation/js/functions/passwordStrengthTester.html @@ -1 +1,14 @@ -Documentation

Password Strength Tester Function Documentation

The passwordStrengthTester function evaluates the strength of a given password and returns the type of password strength as a string. The possible strength types are: "veryWeak", "weak", "regular", "strong", or "veryStrong", based on specific criteria.

Import

The function can be imported using ES6 syntax from the "password-strength-tester" package:

import { passwordStrengthTester } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { passwordStrengthTester } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the password to be evaluated.

Examples

const result1 = passwordStrengthTester('12345'); // Output: 'veryWeak' console.log(result1); const result2 = passwordStrengthTester('abcdef'); // Output: 'weak' console.log(result2); const result3 = passwordStrengthTester('abc12345'); // Output: 'regular' console.log(result3); const result4 = passwordStrengthTester('Abc123awdasd'); // Output: 'strong' console.log(result4); const result5 = passwordStrengthTester('SuperSecurePassword123!@'); // Output: 'veryStrong' console.log(result5);

Notes

The function checks the length of the password and applies certain criteria to classify the password strength. The returned strength type is based on the following criteria:

\ No newline at end of file +Documentation

Password Strength Tester Function Documentation

The passwordStrengthTester function evaluates the strength of a given password and returns the type of password strength as a string. The possible strength types are: "veryWeak", "weak", "regular", "strong", or "veryStrong", based on specific criteria.

Import

The function can be imported using ES6 syntax from the "password-strength-tester" package:

import { passwordStrengthTester } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { passwordStrengthTester } = require('multiform-validator');

Parameters

The function takes one parameter, which must be a string representing the password to be evaluated.

Examples

const result1 = passwordStrengthTester("12345");
+console.log(result1);  // Output: veryWeak
+
+const result2 = passwordStrengthTester("abcdef");
+console.log(result2); // Output: weak
+
+const result3 = passwordStrengthTester("abc12345");
+console.log(result3); // Output: regular
+
+const result4 = passwordStrengthTester("Abc123awdasd");
+console.log(result4); // Output: strong
+
+const result5 = passwordStrengthTester("SuperSecurePassword123!@");
+console.log(result5); // Output: veryStrong

Notes

The function checks the length of the password and applies certain criteria to classify the password strength. The returned strength type is based on the following criteria:

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/passwordStrengthTester.txt b/docs/page/documentation/js/functions/passwordStrengthTester.txt index cfcf3b6..ce12ec1 100644 --- a/docs/page/documentation/js/functions/passwordStrengthTester.txt +++ b/docs/page/documentation/js/functions/passwordStrengthTester.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6988","static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-6ebb71237e2b6513.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6988","static/chunks/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page-fe8d754247164146.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["passwordStrengthTester",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["passwordStrengthTester",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Password Strength Tester Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"passwordStrengthTester"}]," function evaluates the strength of a given password and returns the type of password strength as a string. The possible strength types are: \"veryWeak\", \"weak\", \"regular\", \"strong\", or \"veryStrong\", based on specific criteria."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"password-strength-tester\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" passwordStrengthTester "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" passwordStrengthTester "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the password to be evaluated."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"password"}]," (string) - The password to be evaluated for strength."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"children":["$","code",null,{"className":"language-javascript","children":"const result1 = passwordStrengthTester('12345'); // Output: 'veryWeak' console.log(result1); const result2 = passwordStrengthTester('abcdef'); // Output: 'weak' console.log(result2); const result3 = passwordStrengthTester('abc12345'); // Output: 'regular' console.log(result3); const result4 = passwordStrengthTester('Abc123awdasd'); // Output: 'strong' console.log(result4); const result5 = passwordStrengthTester('SuperSecurePassword123!@'); // Output: 'veryStrong' console.log(result5);"}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function checks the length of the password and applies certain criteria to classify the password strength. The returned strength type is based on the following criteria:"}],["$","ul",null,{"children":[["$","li",null,{"children":"'veryWeak' - Password with less than 6 characters, consisting only of numbers"}],["$","li",null,{"children":"'weak' - Password with less than 6 characters, consisting of numbers and letters"}],["$","li",null,{"children":"'weak' - Password that repeats the same character more than 3 times in a row and is less than 10 characters long"}],["$","li",null,{"children":"'weak' - Password between 5 and 8 characters, consisting only of numbers"}],["$","li",null,{"children":"'regular' - Password between 9 and 12 characters"}],["$","li",null,{"children":"'regular' - Password greater than or equal to 6 and less than 8 characters, containing at least one number and one letter"}],["$","li",null,{"children":"'regular' - Password greater than 10 and has characters that are repeated more than 5 times in sequence"}],["$","li",null,{"children":"'strong' - Password between 13 and 16 characters"}],["$","li",null,{"children":"'strong' - Password with 8 or more characters, containing at least one uppercase letter, one number and one lowercase letter"}],["$","li",null,{"children":"'veryStrong' - Password longer than 16 characters"}],["$","li",null,{"children":"'veryStrong' - Password with 8 or more characters, containing at least one uppercase letter, one number, one special character and one lowercase letter"}]]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","passwordStrengthTester","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["passwordStrengthTester",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["passwordStrengthTester",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Password Strength Tester Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"passwordStrengthTester"}]," function evaluates the strength of a given password and returns the type of password strength as a string. The possible strength types are: \"veryWeak\", \"weak\", \"regular\", \"strong\", or \"veryStrong\", based on specific criteria."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"password-strength-tester\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" passwordStrengthTester "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" passwordStrengthTester "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes one parameter, which must be a string representing the password to be evaluated."}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"password"}]," (string) - The password to be evaluated for strength."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["passwordStrengthTester"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"12345\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: veryWeak"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement22",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement27",{"className":"token","style":{"color":"#ffd700"},"children":["passwordStrengthTester"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement29",{"className":"token","style":{"color":"#abe338"},"children":["\"abcdef\""]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement34",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement36",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: weak"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement45",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#ffd700"},"children":["passwordStrengthTester"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["\"abc12345\""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement57",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement59",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement65",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: regular"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement68",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement69",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement71",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement73",{"className":"token","style":{"color":"#ffd700"},"children":["passwordStrengthTester"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement75",{"className":"token","style":{"color":"#abe338"},"children":["\"Abc123awdasd\""]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement80",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement81",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement82",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement88",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: strong"]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement96",{"className":"token","style":{"color":"#ffd700"},"children":["passwordStrengthTester"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"token","style":{"color":"#abe338"},"children":["\"SuperSecurePassword123!@\""]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement105",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement111",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: veryStrong"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Notes"}],["$","p",null,{"children":"The function checks the length of the password and applies certain criteria to classify the password strength. The returned strength type is based on the following criteria:"}],["$","ul",null,{"children":[["$","li",null,{"children":"'veryWeak' - Password with less than 6 characters, consisting only of numbers"}],["$","li",null,{"children":"'weak' - Password with less than 6 characters, consisting of numbers and letters"}],["$","li",null,{"children":"'weak' - Password that repeats the same character more than 3 times in a row and is less than 10 characters long"}],["$","li",null,{"children":"'weak' - Password between 5 and 8 characters, consisting only of numbers"}],["$","li",null,{"children":"'regular' - Password between 9 and 12 characters"}],["$","li",null,{"children":"'regular' - Password greater than or equal to 6 and less than 8 characters, containing at least one number and one letter"}],["$","li",null,{"children":"'regular' - Password greater than 10 and has characters that are repeated more than 5 times in sequence"}],["$","li",null,{"children":"'strong' - Password between 13 and 16 characters"}],["$","li",null,{"children":"'strong' - Password with 8 or more characters, containing at least one uppercase letter, one number and one lowercase letter"}],["$","li",null,{"children":"'veryStrong' - Password longer than 16 characters"}],["$","li",null,{"children":"'veryStrong' - Password with 8 or more characters, containing at least one uppercase letter, one number, one special character and one lowercase letter"}]]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","passwordStrengthTester","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateBRPhoneNumber.html b/docs/page/documentation/js/functions/validateBRPhoneNumber.html index 998069c..9d0d30e 100644 --- a/docs/page/documentation/js/functions/validateBRPhoneNumber.html +++ b/docs/page/documentation/js/functions/validateBRPhoneNumber.html @@ -1,4 +1,4 @@ -Documentation

BR Phone Number Validation Function Documentation

The validateBRPhoneNumber function is used to validate Brazilian phone numbers. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Import

The function can be imported using ES6 syntax from the "br-phone-number-validator" package:

import { validateBRPhoneNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateBRPhoneNumber } = require('multiform-validator');

Parameters

The function takes two parameters:

Default Error Messages

The default error messages are as follows:

[
+Documentation

BR Phone Number Validation Function Documentation

The validateBRPhoneNumber function is used to validate Brazilian phone numbers. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Import

The function can be imported using ES6 syntax from the "br-phone-number-validator" package:

import { validateBRPhoneNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateBRPhoneNumber } = require('multiform-validator');

Parameters

The function takes two parameters:

  • phoneNumber (string) - The Brazilian phone number to be validated.
  • errorMsg (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.

Default Error Messages

The default error messages are as follows:

[
 	'Invalid value passed',
 	'Invalid phone number',
 	'Unknown error'
@@ -17,4 +17,4 @@
 
 const result4 = validateBRPhoneNumber('(11) 1234-5678', customErrorMsg);
 console.log(result4);
-// Output: { isValid: false, errorMsg: 'Invalid phone number' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Invalid phone number' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateBRPhoneNumber.txt b/docs/page/documentation/js/functions/validateBRPhoneNumber.txt index eb6b475..4558e9b 100644 --- a/docs/page/documentation/js/functions/validateBRPhoneNumber.txt +++ b/docs/page/documentation/js/functions/validateBRPhoneNumber.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6538","static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-8bfcc5d3793d54c8.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6538","static/chunks/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page-7895a442711bb842.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateBRPhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateBRPhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"BR Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateBRPhoneNumber"}]," function is used to validate Brazilian phone numbers. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"br-phone-number-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateBRPhoneNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateBRPhoneNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The Brazilian phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","p",null,{"children":"The default error messages are as follows:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 98765-4321'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid format'"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement46",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 98765-4321'"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement53",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement55",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement72",{"className":"token","style":{"color":"#abe338"},"children":["'invalid'"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement77",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement79",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement86",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid value passed' }"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement89",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement90",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 1234-5678'"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement105",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateBRPhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateBRPhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateBRPhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"BR Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateBRPhoneNumber"}]," function is used to validate Brazilian phone numbers. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"br-phone-number-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateBRPhoneNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateBRPhoneNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","p",null,{"children":"The function takes two parameters:"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The Brazilian phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","p",null,{"children":"The default error messages are as follows:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 98765-4321'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid format'"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement46",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 98765-4321'"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement53",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement55",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement65",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement66",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement68",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement72",{"className":"token","style":{"color":"#abe338"},"children":["'invalid'"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement77",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement79",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement86",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid value passed' }"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement89",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement90",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#ffd700"},"children":["validateBRPhoneNumber"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement96",{"className":"token","style":{"color":"#abe338"},"children":["'(11) 1234-5678'"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement105",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateBRPhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateEmail.html b/docs/page/documentation/js/functions/validateEmail.html index c574144..a31a7f5 100644 --- a/docs/page/documentation/js/functions/validateEmail.html +++ b/docs/page/documentation/js/functions/validateEmail.html @@ -1,4 +1,4 @@ -Documentation

Email Validation Function Documentation

The validateEmail function is used to validate email addresses. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the email address is invalid, or it will be null if the email address is valid.

What is the difference between validateEmail and isEmail? isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there, validateEmail does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validateEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateEmail } = require('multiform-validator');

Function Signature

interface OptionsParams {
+Documentation

Email Validation Function Documentation

The validateEmail function is used to validate email addresses. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the email address is invalid, or it will be null if the email address is valid.

What is the difference between validateEmail and isEmail? isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there, validateEmail does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validateEmail } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateEmail } = require('multiform-validator');

Function Signature

interface OptionsParams {
     maxLength?: number;
     country?: string;
     errorMsg?: (string | null)[];
@@ -122,4 +122,4 @@
     validDomains: ["@myownemail.com"],
 });
 console.log(result11);
-// Output: { isValid: true, errorMsg: null }
\ No newline at end of file +
// Output: { isValid: true, errorMsg: null }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateEmail.txt b/docs/page/documentation/js/functions/validateEmail.txt index e4deb92..7f026e9 100644 --- a/docs/page/documentation/js/functions/validateEmail.txt +++ b/docs/page/documentation/js/functions/validateEmail.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","488","static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-4c27e616a43ee7c4.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","488","static/chunks/app/(doc-session)/documentation/js/functions/validateEmail/page-ece0eb53256826b6.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Email Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateEmail"}]," function is used to validate email addresses. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the email address is invalid, or it will be null if the email address is valid."]}],["$","p",null,{"children":["What is the difference between ",["$","code",null,{"children":"validateEmail"}]," and"," ",["$","code",null,{"children":"isEmail"}],"? isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there, ",["$","code",null,{"children":"validateEmail"}]," does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters"]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" maxLength"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" country"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" errorMsg"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" validDomains"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" boolean "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement46",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement47",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#00e0e0"},"children":["400"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#abe338"},"children":["\"\""]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement73",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement90",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement91",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement93",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement97",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["email"]}],["$","span","code-segement98",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement99",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement100",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement101",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement103",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement104",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement105",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement106",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement107",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"token parameter","style":{},"children":[" country"]}],["$","span","code-segement109",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement110",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"token parameter","style":{},"children":[" errorMsg"]}],["$","span","code-segement112",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement113",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement114",{"className":"token parameter","style":{},"children":[" validDomains"]}],["$","span","code-segement115",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement116",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement118",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement119",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement120",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement121",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement122",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement123",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement125",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement126",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement141",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement142",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement143",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement144",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement146",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"email"}]," (string) - The email address to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the email address. If not provided, the default value is 400."]}],["$","li",null,{"children":[["$","code",null,{"children":"country"}]," (string) [optional] - The country code to check if the email ends with it. If not provided, no country code check will be performed."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}],["$","li",null,{"children":[["$","code",null,{"children":"validDomains"}]," (boolean | string[]) [optional] - This parameter determines whether to check for specific valid email domains or not. If set to ",["$","code",null,{"children":"true"}],", the function will use a default list of valid domains. If set to ",["$","code",null,{"children":"false"}],", no domain check will be performed. Alternatively, you can pass an array of custom valid domains to perform the check against a specific list."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default list of valid domains"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'@gmail.com'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'@outlook.com'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'@yahoo.com'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'@icloud.com'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'@hotmail.com'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'@mail.ru'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'@yandex.ru'"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#abe338"},"children":["'@gmx.com'"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'@zoho.com'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement39",{"className":"token","style":{"color":"#abe338"},"children":["'@protonmail.com'"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'@protonmail.ch'"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'This e-mail is not valid'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Email too big, try again'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This email is not valid in the country'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Email domain is not allowed.'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result1"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement5",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["\"foor@bar.com\""]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement17",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement18",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["\"us\""]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement38",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement45",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This email is not valid in the country' }"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["customErrorMsg"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#abe338"},"children":["\"Invalid format\""]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#abe338"},"children":["\"Invalid phone number\""]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#abe338"},"children":["\"Unknown error\""]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement80",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result2"]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement87",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"token","style":{"color":"#abe338"},"children":["\"foor@bar.com\""]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement94",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement95",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#abe338"},"children":["\"br\""]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement109",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement120",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement122",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement129",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This email is not valid in the country' }"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement132",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement133",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement134",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement135",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result3"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement140",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement142",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement144",{"className":"token","style":{"color":"#abe338"},"children":["\"invalid\""]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement147",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement148",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement149",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement150",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement152",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement153",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement154",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement157",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement161",{"className":"token","style":{"color":"#abe338"},"children":["\"My own error message\""]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement165",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement166",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement167",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement168",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement169",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement171",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement173",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement175",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement176",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement177",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This e-mail is not valid' }"]}],["$","span","code-segement181",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement183",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement184",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement185",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement186",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result4"]}],["$","span","code-segement187",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement189",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement190",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement191",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement193",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement194",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement195",{"className":"token","style":{"color":"#abe338"},"children":["\"joao@myOwnDomain.com\""]}],["$","span","code-segement196",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement197",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement200",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement201",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement202",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement203",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement205",{"className":"token","style":{"color":"#abe338"},"children":["\"@myOwnDomain.com\""]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement207",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement208",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement209",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement210",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement211",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement212",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement213",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement215",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement216",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement217",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement218",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement219",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement221",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement223",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement224",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement225",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement227",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement228",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement229",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement230",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result5"]}],["$","span","code-segement231",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement232",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement233",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement234",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement235",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement236",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement237",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement238",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement239",{"className":"token","style":{"color":"#abe338"},"children":["\"joaoaoao@gmail.com.com\""]}],["$","span","code-segement240",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement241",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement242",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement243",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement244",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement245",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement246",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement248",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement249",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement250",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement251",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement253",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement254",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement255",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement256",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement257",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement258",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement259",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement260",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement261",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement262",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement263",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement264",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement265",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement266",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement267",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement269",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement270",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement272",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result6"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement274",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement275",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement276",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement277",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement278",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement279",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement280",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement281",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@bar.com\""]}],["$","span","code-segement282",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement283",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement284",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement286",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement287",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement288",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement289",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement290",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement291",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement292",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement293",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement294",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement295",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement296",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement297",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement298",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement299",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement300",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement302",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement303",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement304",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement305",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement306",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement307",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement308",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement309",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement310",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement311",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement312",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement313",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement314",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement315",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Email domain is not allowed.' }"]}],["$","span","code-segement316",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement318",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement319",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement320",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement321",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result7"]}],["$","span","code-segement322",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement323",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement324",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement326",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement327",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement328",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement329",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement330",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement331",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement332",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement333",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement334",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement335",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement336",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement337",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement338",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement339",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement340",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement341",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement342",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement343",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement344",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement345",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement346",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement347",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement348",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement349",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement350",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement351",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement352",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement353",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement354",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement355",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement356",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement357",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement358",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement359",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement360",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement361",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement362",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement363",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement364",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement365",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement366",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Email domain is not allowed.' }"]}],["$","span","code-segement367",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement369",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement370",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement371",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement372",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result8"]}],["$","span","code-segement373",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement374",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement375",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement376",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement377",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement378",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement379",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement380",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement381",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement382",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement383",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement384",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement385",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement386",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement387",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement388",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement389",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement390",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement391",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement392",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement393",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement394",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement395",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement396",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement397",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement398",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement399",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement400",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement401",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement402",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement403",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement404",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement405",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement406",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement407",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement408",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement409",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement410",{"className":"token","style":{"color":"#abe338"},"children":["\"This is my own error for domain\""]}],["$","span","code-segement411",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement412",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement413",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement414",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement415",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement416",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement417",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement418",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement419",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement420",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement421",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement422",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement423",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement424",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement425",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement426",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement427",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement428",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement429",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement430",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement431",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement432",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement433",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement434",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement435",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement436",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement437",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement438",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This is my own error for domain' }"]}],["$","span","code-segement439",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement441",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement442",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement443",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement444",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result9"]}],["$","span","code-segement445",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement446",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement447",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement448",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement449",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement450",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement451",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement452",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement453",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@myownemail.com\""]}],["$","span","code-segement454",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement455",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement456",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement457",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement458",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement459",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement460",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement461",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement462",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement463",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement464",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement465",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement466",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement467",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement468",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement469",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement470",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement471",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement472",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement473",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement474",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement475",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement476",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement477",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement478",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement479",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement480",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement481",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement482",{"className":"token","style":{"color":"#abe338"},"children":["\"This is my own error for domain\""]}],["$","span","code-segement483",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement484",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement485",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement486",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement487",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement488",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement489",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement490",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement491",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement492",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement493",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement494",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement495",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement496",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement497",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement498",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement499",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement500",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement501",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement502",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement503",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement504",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement505",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement506",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement507",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement508",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement509",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement510",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement511",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement513",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement514",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement515",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement516",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result10"]}],["$","span","code-segement517",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement518",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement519",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement520",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement521",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement522",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement523",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement524",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement525",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement526",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement527",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement528",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement529",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement530",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement531",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement532",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement533",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement534",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement535",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement536",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement537",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement538",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement539",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement540",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement541",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement542",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError1\""]}],["$","span","code-segement543",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement544",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement545",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError2\""]}],["$","span","code-segement546",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement547",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement548",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError3\""]}],["$","span","code-segement549",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement550",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement551",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError4\""]}],["$","span","code-segement552",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement553",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement554",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError5\""]}],["$","span","code-segement555",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement556",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement557",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement558",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement559",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement560",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement561",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement562",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement563",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement564",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement565",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement566",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement567",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement568",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement569",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement570",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement571",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement572",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement573",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement574",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement575",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement576",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement577",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement578",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement579",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement580",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement581",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement582",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'OwnError5' }"]}],["$","span","code-segement583",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement585",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement586",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement587",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement588",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result11"]}],["$","span","code-segement589",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement590",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement591",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement592",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement593",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement594",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement595",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement596",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement597",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@myownemail.com\""]}],["$","span","code-segement598",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement599",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement600",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement601",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement602",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement603",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement604",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement605",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement606",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement607",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement608",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement609",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement610",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement611",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement612",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement613",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement614",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError1\""]}],["$","span","code-segement615",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement616",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement617",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError2\""]}],["$","span","code-segement618",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement619",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement620",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError3\""]}],["$","span","code-segement621",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement622",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement623",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError4\""]}],["$","span","code-segement624",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement625",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement626",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError5\""]}],["$","span","code-segement627",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement628",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement629",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement630",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement631",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement632",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement633",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement634",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement635",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement636",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement637",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement638",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement639",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement640",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement641",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement642",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement643",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement644",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement645",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement646",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement647",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement648",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement649",{"className":"$undefined","style":{},"children":["result11"]}],["$","span","code-segement650",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement651",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement652",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement653",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement654",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateEmail",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateEmail",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Email Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateEmail"}]," function is used to validate email addresses. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the email address is invalid, or it will be null if the email address is valid."]}],["$","p",null,{"children":["What is the difference between ",["$","code",null,{"children":"validateEmail"}]," and"," ",["$","code",null,{"children":"isEmail"}],"? isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there, ",["$","code",null,{"children":"validateEmail"}]," does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters"]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateEmail "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateEmail "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" maxLength"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" country"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" errorMsg"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" validDomains"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" boolean "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement43",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement46",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement47",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#00e0e0"},"children":["400"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement67",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#abe338"},"children":["\"\""]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement73",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement74",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement83",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement87",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement90",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement91",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement93",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement97",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["email"]}],["$","span","code-segement98",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement99",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement100",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement101",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement103",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement104",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement105",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement106",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement107",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"token parameter","style":{},"children":[" country"]}],["$","span","code-segement109",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement110",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"token parameter","style":{},"children":[" errorMsg"]}],["$","span","code-segement112",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement113",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement114",{"className":"token parameter","style":{},"children":[" validDomains"]}],["$","span","code-segement115",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement116",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement117",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement118",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement119",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement120",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement121",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement122",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement123",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement124",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement125",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement126",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement129",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement135",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement141",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement142",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement143",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement144",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement146",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"email"}]," (string) - The email address to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the email address. If not provided, the default value is 400."]}],["$","li",null,{"children":[["$","code",null,{"children":"country"}]," (string) [optional] - The country code to check if the email ends with it. If not provided, no country code check will be performed."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}],["$","li",null,{"children":[["$","code",null,{"children":"validDomains"}]," (boolean | string[]) [optional] - This parameter determines whether to check for specific valid email domains or not. If set to ",["$","code",null,{"children":"true"}],", the function will use a default list of valid domains. If set to ",["$","code",null,{"children":"false"}],", no domain check will be performed. Alternatively, you can pass an array of custom valid domains to perform the check against a specific list."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default list of valid domains"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'@gmail.com'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'@outlook.com'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'@yahoo.com'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'@icloud.com'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'@hotmail.com'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'@mail.ru'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'@yandex.ru'"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#abe338"},"children":["'@gmx.com'"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement35",{"className":"token","style":{"color":"#abe338"},"children":["'@zoho.com'"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement39",{"className":"token","style":{"color":"#abe338"},"children":["'@protonmail.com'"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'@protonmail.ch'"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'This e-mail is not valid'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Email too big, try again'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This email is not valid in the country'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Email domain is not allowed.'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result1"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement5",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["\"foor@bar.com\""]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement17",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement18",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["\"us\""]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement38",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement45",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This email is not valid in the country' }"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement51",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["customErrorMsg"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" string"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token","style":{"color":"#abe338"},"children":["\"Invalid format\""]}],["$","span","code-segement63",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#abe338"},"children":["\"Invalid phone number\""]}],["$","span","code-segement67",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#abe338"},"children":["\"Unknown error\""]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement72",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement78",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement80",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result2"]}],["$","span","code-segement81",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement87",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement89",{"className":"token","style":{"color":"#abe338"},"children":["\"foor@bar.com\""]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement91",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement92",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement94",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement95",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement96",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement102",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement103",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement104",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement105",{"className":"token","style":{"color":"#abe338"},"children":["\"br\""]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement109",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement114",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement115",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement117",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement118",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement120",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement122",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement123",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement124",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement126",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement129",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This email is not valid in the country' }"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement132",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement133",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement134",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement135",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result3"]}],["$","span","code-segement136",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement140",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement142",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement144",{"className":"token","style":{"color":"#abe338"},"children":["\"invalid\""]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement147",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement148",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement149",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement150",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement151",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement152",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement153",{"className":"token","style":{"color":"#00e0e0"},"children":["30"]}],["$","span","code-segement154",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement155",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement156",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement157",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement158",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement160",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement161",{"className":"token","style":{"color":"#abe338"},"children":["\"My own error message\""]}],["$","span","code-segement162",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement163",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement164",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement165",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement166",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement167",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement168",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement169",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement171",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement173",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement174",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement175",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement176",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement177",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement180",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This e-mail is not valid' }"]}],["$","span","code-segement181",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement183",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement184",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement185",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement186",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result4"]}],["$","span","code-segement187",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement189",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement190",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement191",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement193",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement194",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement195",{"className":"token","style":{"color":"#abe338"},"children":["\"joao@myOwnDomain.com\""]}],["$","span","code-segement196",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement197",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement200",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement201",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement202",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement203",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement205",{"className":"token","style":{"color":"#abe338"},"children":["\"@myOwnDomain.com\""]}],["$","span","code-segement206",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement207",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement208",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement209",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement210",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement211",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement212",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement213",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement215",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement216",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement217",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement218",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement219",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement221",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement223",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement224",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement225",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement227",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement228",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement229",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement230",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result5"]}],["$","span","code-segement231",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement232",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement233",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement234",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement235",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement236",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement237",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement238",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement239",{"className":"token","style":{"color":"#abe338"},"children":["\"joaoaoao@gmail.com.com\""]}],["$","span","code-segement240",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement241",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement242",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement243",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement244",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement245",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement246",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement248",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement249",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement250",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement251",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement253",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement254",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement255",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement256",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement257",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement258",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement259",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement260",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement261",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement262",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement263",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement264",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement265",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement266",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement267",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement269",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement270",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement272",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result6"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement274",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement275",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement276",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement277",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement278",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement279",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement280",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement281",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@bar.com\""]}],["$","span","code-segement282",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement283",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement284",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement286",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement287",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement288",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement289",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement290",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement291",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement292",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement293",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement294",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement295",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement296",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement297",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement298",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement299",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement300",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement302",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement303",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement304",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement305",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement306",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement307",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement308",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement309",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement310",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement311",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement312",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement313",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement314",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement315",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Email domain is not allowed.' }"]}],["$","span","code-segement316",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement318",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement319",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement320",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement321",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result7"]}],["$","span","code-segement322",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement323",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement324",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement326",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement327",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement328",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement329",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement330",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement331",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement332",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement333",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement334",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement335",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement336",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement337",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement338",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement339",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement340",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement341",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement342",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement343",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement344",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement345",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement346",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement347",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement348",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement349",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement350",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement351",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement352",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement353",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement354",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement355",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement356",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement357",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement358",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement359",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement360",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement361",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement362",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement363",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement364",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement365",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement366",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Email domain is not allowed.' }"]}],["$","span","code-segement367",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement369",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement370",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement371",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement372",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result8"]}],["$","span","code-segement373",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement374",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement375",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement376",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement377",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement378",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement379",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement380",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement381",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement382",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement383",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement384",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement385",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement386",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement387",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement388",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement389",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement390",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement391",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement392",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement393",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement394",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement395",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement396",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement397",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement398",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement399",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement400",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement401",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement402",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement403",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement404",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement405",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement406",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement407",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement408",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement409",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement410",{"className":"token","style":{"color":"#abe338"},"children":["\"This is my own error for domain\""]}],["$","span","code-segement411",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement412",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement413",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement414",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement415",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement416",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement417",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement418",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement419",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement420",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement421",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement422",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement423",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement424",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement425",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement426",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement427",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement428",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement429",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement430",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement431",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement432",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement433",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement434",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement435",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement436",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement437",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement438",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This is my own error for domain' }"]}],["$","span","code-segement439",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement441",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement442",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement443",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement444",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result9"]}],["$","span","code-segement445",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement446",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement447",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement448",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement449",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement450",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement451",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement452",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement453",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@myownemail.com\""]}],["$","span","code-segement454",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement455",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement456",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement457",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement458",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement459",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement460",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement461",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement462",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement463",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement464",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement465",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement466",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement467",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement468",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement469",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement470",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement471",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement472",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement473",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement474",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement475",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement476",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement477",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement478",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement479",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement480",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement481",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement482",{"className":"token","style":{"color":"#abe338"},"children":["\"This is my own error for domain\""]}],["$","span","code-segement483",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement484",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement485",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement486",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement487",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement488",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement489",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement490",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement491",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement492",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement493",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement494",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement495",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement496",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement497",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement498",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement499",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement500",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement501",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement502",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement503",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement504",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement505",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement506",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement507",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement508",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement509",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement510",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement511",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement513",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement514",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement515",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement516",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result10"]}],["$","span","code-segement517",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement518",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement519",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement520",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement521",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement522",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement523",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement524",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement525",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@gmail.com\""]}],["$","span","code-segement526",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement527",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement528",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement529",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement530",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement531",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement532",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement533",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement534",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement535",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement536",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement537",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement538",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement539",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement540",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement541",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement542",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError1\""]}],["$","span","code-segement543",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement544",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement545",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError2\""]}],["$","span","code-segement546",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement547",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement548",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError3\""]}],["$","span","code-segement549",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement550",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement551",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError4\""]}],["$","span","code-segement552",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement553",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement554",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError5\""]}],["$","span","code-segement555",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement556",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement557",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement558",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement559",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement560",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement561",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement562",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement563",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement564",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement565",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement566",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement567",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement568",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement569",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement570",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement571",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement572",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement573",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement574",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement575",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement576",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement577",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement578",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement579",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement580",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement581",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement582",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'OwnError5' }"]}],["$","span","code-segement583",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement585",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement586",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement587",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement588",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["result11"]}],["$","span","code-segement589",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement590",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement591",{"className":"token maybe-class-name","style":{},"children":["ValidateFunctions"]}],["$","span","code-segement592",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement593",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement594",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement595",{"className":"token","style":{"color":"#ffd700"},"children":["validateEmail"]}],["$","span","code-segement596",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement597",{"className":"token","style":{"color":"#abe338"},"children":["\"foo@myownemail.com\""]}],["$","span","code-segement598",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement599",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement600",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement601",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement602",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement603",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement604",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement605",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement606",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement607",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement608",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement609",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement610",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement611",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement612",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement613",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement614",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError1\""]}],["$","span","code-segement615",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement616",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement617",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError2\""]}],["$","span","code-segement618",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement619",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement620",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError3\""]}],["$","span","code-segement621",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement622",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement623",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError4\""]}],["$","span","code-segement624",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement625",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement626",{"className":"token","style":{"color":"#abe338"},"children":["\"OwnError5\""]}],["$","span","code-segement627",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement628",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement629",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement630",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement631",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["validDomains"]}],["$","span","code-segement632",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement633",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement634",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement635",{"className":"token","style":{"color":"#abe338"},"children":["\"@myownemail.com\""]}],["$","span","code-segement636",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement637",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement638",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement639",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement640",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement641",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement642",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement643",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement644",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement645",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement646",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement647",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement648",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement649",{"className":"$undefined","style":{},"children":["result11"]}],["$","span","code-segement650",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement651",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement652",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement653",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement654",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateEmail","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateName.html b/docs/page/documentation/js/functions/validateName.html index 306d75d..962bc5b 100644 --- a/docs/page/documentation/js/functions/validateName.html +++ b/docs/page/documentation/js/functions/validateName.html @@ -1,4 +1,4 @@ -Documentation

Name Validation Function Documentation

The validateName function is used to validate names. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the name is invalid, or it will be null if the name is valid.

Function Signature

function validateName(
+Documentation

Name Validation Function Documentation

The validateName function is used to validate names. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "errorMsg" property will contain the error message if the name is invalid, or it will be null if the name is valid.

Function Signature

function validateName(
         name: string,
         {
             minLength?: number,
@@ -29,4 +29,4 @@
 
 const result4 = validateName("NameWithTwentyOneCharacters");
 console.log(result4);
-// Output: { isValid: false, errorMsg: 'Name too big, try again' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Name too big, try again' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateName.txt b/docs/page/documentation/js/functions/validateName.txt index 1de7372..ef2be5f 100644 --- a/docs/page/documentation/js/functions/validateName.txt +++ b/docs/page/documentation/js/functions/validateName.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2819","static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-8dc10e865712b198.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2819","static/chunks/app/(doc-session)/documentation/js/functions/validateName/page-06939b7265a40f50.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateName",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateName",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Name Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateName"}]," function is used to validate names. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the name is invalid, or it will be null if the name is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["name"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement13",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" minLength"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement17",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement18",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement19",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement20",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement21",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement22",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement24",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"token parameter","style":{},"children":[" errorMsg"]}],["$","span","code-segement27",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement28",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement29",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement30",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement32",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement33",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"name"}]," (string) - The name to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length allowed for the name. Default value: 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the name. Default value: 20."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Name cannot contain numbers'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Name cannot contain special characters'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This name is not valid'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Name too big, try again'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"John\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["2"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement50",{"className":"token","style":{"color":"#abe338"},"children":["\"J0hn\""]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement57",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name cannot contain numbers' }"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement67",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement68",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement74",{"className":"token","style":{"color":"#abe338"},"children":["\"John$\""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement79",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement81",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name cannot contain special characters' }"]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement96",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"token","style":{"color":"#abe338"},"children":["\"NameWithTwentyOneCharacters\""]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement105",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name too big, try again' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateName","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateName",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateName",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Name Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateName"}]," function is used to validate names. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"errorMsg\" property will contain the error message if the name is invalid, or it will be null if the name is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["name"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement13",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" minLength"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement17",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement18",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement19",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement20",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement21",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement22",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement24",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"token parameter","style":{},"children":[" errorMsg"]}],["$","span","code-segement27",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement28",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement29",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement30",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement32",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement33",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"name"}]," (string) - The name to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length allowed for the name. Default value: 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the name. Default value: 20."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Name cannot contain numbers'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Name cannot contain special characters'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This name is not valid'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Name too big, try again'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"John\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["2"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement50",{"className":"token","style":{"color":"#abe338"},"children":["\"J0hn\""]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement55",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement57",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement60",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement62",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name cannot contain numbers' }"]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement67",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement68",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement74",{"className":"token","style":{"color":"#abe338"},"children":["\"John$\""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement79",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement81",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement88",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name cannot contain special characters' }"]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement91",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement96",{"className":"token","style":{"color":"#ffd700"},"children":["validateName"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"token","style":{"color":"#abe338"},"children":["\"NameWithTwentyOneCharacters\""]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement105",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement106",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement112",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Name too big, try again' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateName","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validatePassportNumber.html b/docs/page/documentation/js/functions/validatePassportNumber.html index 26b81c6..fc5ab06 100644 --- a/docs/page/documentation/js/functions/validatePassportNumber.html +++ b/docs/page/documentation/js/functions/validatePassportNumber.html @@ -1,4 +1,4 @@ -Documentation

Passport Number Validation Function Documentation

The validatePassportNumber function is used to validate passport numbers. It returns an object with two properties: 'isValid' (boolean) and 'country' (string). The 'isValid' property will be true if the passport number matches the supported formats, and 'country' property will indicate the country associated with the passport number. If the passport number does not match any supported format, 'isValid' will be false, and 'country' will be null.

Function Signature

function validatePassportNumber(
+Documentation

Passport Number Validation Function Documentation

The validatePassportNumber function is used to validate passport numbers. It returns an object with two properties: 'isValid' (boolean) and 'country' (string). The 'isValid' property will be true if the passport number matches the supported formats, and 'country' property will indicate the country associated with the passport number. If the passport number does not match any supported format, 'isValid' will be false, and 'country' will be null.

Function Signature

function validatePassportNumber(
 		passportNumber: string
 ): { isValid: boolean, country: string | null };

Parameters

  • passportNumber (string) - The passport number to be validated.

Examples

const result1 = validatePassportNumber('A1234567');
 console.log(result1);
@@ -6,4 +6,4 @@
 
 const result2 = validatePassportNumber('123456789');
 console.log(result2);
-// Output: { isValid: false, country: null }

Supported Passport Formats

  • United States: 9 digits (e.g., '123456789')
  • United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')
  • Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')
  • Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')
  • Australia: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')
  • Brazil: 9 digits (e.g., '123456789')
  • France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')
  • Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')
  • India: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')
  • China: 1 uppercase letter followed by 8 digits (e.g., 'A12345678')
\ No newline at end of file +
// Output: { isValid: false, country: null }

Supported Passport Formats

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validatePassportNumber.txt b/docs/page/documentation/js/functions/validatePassportNumber.txt index 4da4402..7b0ce34 100644 --- a/docs/page/documentation/js/functions/validatePassportNumber.txt +++ b/docs/page/documentation/js/functions/validatePassportNumber.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8958","static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-6560e5875a720af1.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","8958","static/chunks/app/(doc-session)/documentation/js/functions/validatePassportNumber/page-7abdeae3f2bda9e8.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassportNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassportNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Passport Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePassportNumber"}]," function is used to validate passport numbers. It returns an object with two properties: 'isValid' (boolean) and 'country' (string). The 'isValid' property will be true if the passport number matches the supported formats, and 'country' property will indicate the country associated with the passport number. If the passport number does not match any supported format, 'isValid' will be false, and 'country' will be null."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["passportNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement21",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"passportNumber"}]," (string) - The passport number to be validated."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'A1234567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, country: 'United States' }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement30",{"className":"token","style":{"color":"#abe338"},"children":["'123456789'"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement37",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, country: null }"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Supported Passport Formats"}],["$","ul",null,{"children":[["$","li",null,{"children":"United States: 9 digits (e.g., '123456789')"}],["$","li",null,{"children":"United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')"}],["$","li",null,{"children":"Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')"}],["$","li",null,{"children":"Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"Australia: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"Brazil: 9 digits (e.g., '123456789')"}],["$","li",null,{"children":"France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')"}],["$","li",null,{"children":"Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"India: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"China: 1 uppercase letter followed by 8 digits (e.g., 'A12345678')"}]]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePassportNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassportNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassportNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Passport Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePassportNumber"}]," function is used to validate passport numbers. It returns an object with two properties: 'isValid' (boolean) and 'country' (string). The 'isValid' property will be true if the passport number matches the supported formats, and 'country' property will indicate the country associated with the passport number. If the passport number does not match any supported format, 'isValid' will be false, and 'country' will be null."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["passportNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement16",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement21",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["country"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":["$","li",null,{"children":[["$","code",null,{"children":"passportNumber"}]," (string) - The passport number to be validated."]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'A1234567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, country: 'United States' }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassportNumber"]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement30",{"className":"token","style":{"color":"#abe338"},"children":["'123456789'"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement37",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, country: null }"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Supported Passport Formats"}],["$","ul",null,{"children":[["$","li",null,{"children":"United States: 9 digits (e.g., '123456789')"}],["$","li",null,{"children":"United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')"}],["$","li",null,{"children":"Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')"}],["$","li",null,{"children":"Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"Australia: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"Brazil: 9 digits (e.g., '123456789')"}],["$","li",null,{"children":"France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')"}],["$","li",null,{"children":"Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"India: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')"}],["$","li",null,{"children":"China: 1 uppercase letter followed by 8 digits (e.g., 'A12345678')"}]]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePassportNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validatePassword.html b/docs/page/documentation/js/functions/validatePassword.html index 6dbfb41..6444754 100644 --- a/docs/page/documentation/js/functions/validatePassword.html +++ b/docs/page/documentation/js/functions/validatePassword.html @@ -1,4 +1,4 @@ -Documentation

Password Validation Function Documentation

The validatePassword function is used to validate passwords. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the password meets the specified criteria, and "errorMsg" will contain the error message if the password is invalid, or it will be null if the password is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validatePassword } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validatePassword } = require('multiform-validator');

Function Signature

interface Options {
+Documentation

Password Validation Function Documentation

The validatePassword function is used to validate passwords. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the password meets the specified criteria, and "errorMsg" will contain the error message if the password is invalid, or it will be null if the password is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validatePassword } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validatePassword } = require('multiform-validator');

Function Signature

interface Options {
     requireUppercase?: boolean;
     requireSpecialChar?: boolean;
     requireNumber?: boolean;
@@ -34,14 +34,14 @@
 	}: OptionsParams = defaultOptionsParams,
 ): { isValid: boolean, errorMsg: string | null };

Parameters

  • password (string) - The password to be validated.
  • minLength (number) [optional] - The minimum length allowed for the password. Default value: 1.
  • maxLength (number) [optional] - The maximum length allowed for the password. Default value: Infinity.
  • options (object) [optional] - An object with the following optional properties:
    • requireUppercase (boolean) - Whether the password requires at least one uppercase letter. Default value: false.
    • requireSpecialChar (boolean) - Whether the password requires at least one special character (e.g., !@#$%^&*(),.?":{}| <>). Default value: false.
    • requireNumber (boolean) - Whether the password requires at least one number. Default value: false.
    • requireString (boolean) - Whether the password requires at least one letter. Default value: false.
  • errorMsg (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.

Default Error Messages

[
-																						'This password is too long',
-																						'Password too short',
-																						'Requires at least one capital letter',
-																						'Requires at least one special character',
-																						'Requires at least one number',
-																						'Requires at least one letter',
-																						'Unknown error',
-																				]

Examples

const defaultErrorMsg = [...];
+	'This password is too long',
+	'Password too short',
+	'Requires at least one capital letter',
+	'Requires at least one special character',
+	'Requires at least one number',
+	'Requires at least one letter',
+	'Unknown error',
+]

Examples

const defaultErrorMsg = [...];
 
 // ... validatePassword function ...
 
@@ -106,7 +106,10 @@
 console.log(result5);
 // Output: { isValid: false, errorMsg: 'Requires at least one special character' }
 
-// Example 6: Valid password with custom error message for special character requirement
+/*
+Example 6: Valid password with custom error message
+for special character requirement
+*/
 const myCustomErrorMsg2 = [...defaultErrorMsg];
 myCustomErrorMsg2[3] = "Custom error: Requires at least one special character";
 const result6 = validatePassword("MyP@ssw0rd", {
@@ -154,4 +157,4 @@
 	console.log(result10); // This will not execute
 } catch (error) {
 	console.log(error.message); // Output: "The input should be a string."
-}
\ No newline at end of file +
}
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validatePassword.txt b/docs/page/documentation/js/functions/validatePassword.txt index 42fc2c3..1115706 100644 --- a/docs/page/documentation/js/functions/validatePassword.txt +++ b/docs/page/documentation/js/functions/validatePassword.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","5845","static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-313b029056165a0e.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","5845","static/chunks/app/(doc-session)/documentation/js/functions/validatePassword/page-9679db26a6e9220c.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassword",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassword",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Password Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePassword"}]," function is used to validate passwords. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the password meets the specified criteria, and \"errorMsg\" will contain the error message if the password is invalid, or it will be null if the password is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validatePassword "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validatePassword "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["Options"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" requireUppercase"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" requireSpecialChar"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" requireNumber"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" requireString"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement37",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" minLength"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" maxLength"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" options"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement57",{"className":"token maybe-class-name","style":{},"children":["Options"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" errorMsg"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement78",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement81",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement84",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement86",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement91",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#00e0e0"},"children":["1"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[" infinity"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement104",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement107",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement110",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement113",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement117",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement124",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement126",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement127",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement134",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement142",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement144",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement148",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement150",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement152",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement153",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement155",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement157",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement158",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement159",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["password"]}],["$","span","code-segement160",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement161",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement162",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement163",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement164",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement165",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement166",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement167",{"className":"token parameter","style":{},"children":["\t\tminLength"]}],["$","span","code-segement168",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement169",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement170",{"className":"token parameter","style":{},"children":["\t\tmaxLength"]}],["$","span","code-segement171",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement172",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement173",{"className":"token parameter","style":{},"children":["\t\toptions"]}],["$","span","code-segement174",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement175",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement176",{"className":"token parameter","style":{},"children":["\t\terrorMsg"]}],["$","span","code-segement177",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement178",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement180",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement181",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement182",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement183",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement184",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement185",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement186",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement187",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement191",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement193",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement194",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement195",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement196",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement197",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement201",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement203",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement204",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement205",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement206",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement207",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"password"}]," (string) - The password to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length allowed for the password. Default value: 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the password. Default value: Infinity."]}],["$","li",null,{"children":[["$","code",null,{"children":"options"}]," (object) [optional] - An object with the following optional properties:",["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"requireUppercase"}]," (boolean) - Whether the password requires at least one uppercase letter. Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireSpecialChar"}]," (boolean) - Whether the password requires at least one special character"," ","(e.g., !@#$%^&*(),.?\":{}|\n\t\t\t\t\t\t\t\t\t\t\t\t<>)",". Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireNumber"}]," (boolean) - Whether the password requires at least one number. Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireString"}]," (boolean) - Whether the password requires at least one letter. Default value: false."]}]]}]]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'This password is too long'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Password too short'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one capital letter'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one special character'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one number'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one letter'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":["\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" defaultErrorMsg "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement5",{"className":"token spread","style":{"color":"#00e0e0"},"children":["..."]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#d4d0ab"},"children":["// ... validatePassword function ..."]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement14",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement15",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Examples:"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1: Valid password with default options"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement28",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement51",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2: Weak password with missing uppercase letter"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement67",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement71",{"className":"token","style":{"color":"#abe338"},"children":["\"weakpassword1!\""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement77",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement80",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement81",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement84",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement87",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement91",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement97",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement113",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement115",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement120",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement122",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one capital letter' }"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement125",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement126",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3: Invalid password with too short length"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement129",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement135",{"className":"token","style":{"color":"#abe338"},"children":["\"Pwd1!\""]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement141",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["10"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement148",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement150",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement151",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement155",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement157",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement160",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement161",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement163",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement164",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement165",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement166",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement167",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement168",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement173",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement174",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement176",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement177",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement179",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement180",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement182",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement183",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement184",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement186",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement187",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement189",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement190",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement193",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'password too short' }"]}],["$","span","code-segement194",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement196",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement197",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4: Valid password with custom error message"]}],["$","span","code-segement198",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement200",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg "]}],["$","span","code-segement202",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement203",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement205",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement206",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement207",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Invalid format\""]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement209",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement210",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement211",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Invalid password\""]}],["$","span","code-segement212",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement213",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement215",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Unknown error\""]}],["$","span","code-segement216",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement217",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement218",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement219",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement221",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement223",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement224",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement225",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement226",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement227",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement228",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement229",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement230",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement231",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement232",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement233",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement234",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement235",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement236",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement237",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement238",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement239",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement240",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement241",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement242",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement243",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement244",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement245",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement246",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement248",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement249",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement250",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement251",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement253",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement254",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement255",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement256",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement257",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement258",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement259",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement260",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement261",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement262",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement263",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement264",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement265",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement266",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement267",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement268",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement269",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement270",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement272",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement274",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement275",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement276",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement277",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement278",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement279",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement280",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement281",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement282",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement283",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement284",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement286",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement287",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement288",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement289",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg"]}],["$","span","code-segement290",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement291",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement292",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement293",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement294",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement295",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement296",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement297",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement298",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement299",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement300",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement302",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement303",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement304",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement305",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement306",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement307",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement308",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement310",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement311",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 5: Invalid password with missing special character"]}],["$","span","code-segement312",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement313",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement314",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement315",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement316",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement317",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement318",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement319",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement320",{"className":"token","style":{"color":"#abe338"},"children":["\"WeakPassword1\""]}],["$","span","code-segement321",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement322",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement323",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement324",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement326",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement327",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement328",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement329",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement330",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement331",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement332",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement333",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement334",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement335",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement336",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement337",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement338",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement339",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement340",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement341",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement342",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement343",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement344",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement345",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement346",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement347",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement348",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement349",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement350",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement351",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement352",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement353",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement354",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement355",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement356",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement357",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement358",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement359",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement360",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement361",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement362",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement363",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement364",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement365",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement366",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement367",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement368",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement369",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement370",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement371",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one special character' }"]}],["$","span","code-segement372",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement374",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement375",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 6: Valid password with custom error message for special character requirement"]}],["$","span","code-segement376",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement377",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement378",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement379",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg2 "]}],["$","span","code-segement380",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement381",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement382",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement383",{"className":"token spread","style":{"color":"#00e0e0"},"children":["..."]}],["$","span","code-segement384",{"className":"$undefined","style":{},"children":["defaultErrorMsg"]}],["$","span","code-segement385",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement386",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement387",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement388",{"className":"$undefined","style":{},"children":["myCustomErrorMsg2"]}],["$","span","code-segement389",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement390",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement391",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement392",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement393",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement394",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement395",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Requires at least one special character\""]}],["$","span","code-segement396",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement397",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement398",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement399",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement400",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement401",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement402",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement403",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement404",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement405",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement406",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement407",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement408",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement409",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement410",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement411",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement412",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement413",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement414",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement415",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement416",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement417",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement418",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement419",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement420",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement421",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement422",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement423",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement424",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement425",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement426",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement427",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement428",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement429",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement430",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement431",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement432",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement433",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement434",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement435",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement436",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement437",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement438",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement439",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement440",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement441",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg2"]}],["$","span","code-segement442",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement443",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement444",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement445",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement446",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement447",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement448",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement449",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement450",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement451",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement452",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement453",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement454",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement455",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement456",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement457",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement458",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement459",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement460",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement462",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement463",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 7: Invalid password with missing number"]}],["$","span","code-segement464",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement465",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement466",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement467",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement468",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement469",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement470",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement471",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement472",{"className":"token","style":{"color":"#abe338"},"children":["\"StrongPwd@\""]}],["$","span","code-segement473",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement474",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement475",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement476",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement477",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement478",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement479",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement480",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement481",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement482",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement483",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement484",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement485",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement486",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement487",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement488",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement489",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement490",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement491",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement492",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement493",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement494",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement495",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement496",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement497",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement498",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement499",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement500",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement501",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement502",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement503",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement504",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement505",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement506",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement507",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement508",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement509",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement510",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement511",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement512",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement513",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement514",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement515",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement516",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement517",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement518",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement519",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement520",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one number' }"]}],["$","span","code-segement521",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement523",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement524",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 8: Invalid password with missing letter"]}],["$","span","code-segement525",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement526",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement527",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement528",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement529",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement530",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement531",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement532",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement533",{"className":"token","style":{"color":"#abe338"},"children":["\"12345@#\""]}],["$","span","code-segement534",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement535",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement536",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement537",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement538",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement539",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement540",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement541",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement542",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement543",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement544",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement545",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement546",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement547",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement548",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement549",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement550",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement551",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement552",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement553",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement554",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement555",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement556",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement557",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement558",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement559",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement560",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement561",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement562",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement563",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement564",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement565",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement566",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement567",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement568",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement569",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement570",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement571",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement572",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement573",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement574",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement575",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement576",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement577",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement578",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement579",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement580",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement581",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one letter' }"]}],["$","span","code-segement582",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement584",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement585",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 9: Invalid password exceeding maximum length"]}],["$","span","code-segement586",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement587",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement588",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement589",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement590",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement591",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement592",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement593",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement594",{"className":"token","style":{"color":"#abe338"},"children":["\"VeryLongPassword1234567890!@#$%^\""]}],["$","span","code-segement595",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement596",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement597",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement598",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement599",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement600",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement601",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement602",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement603",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement604",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement605",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement606",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement607",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement608",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement609",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement610",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement611",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement612",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement613",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement614",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement615",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement616",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement617",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement618",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement619",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement620",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement621",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement622",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement623",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement624",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement625",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement626",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement627",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement628",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This password is too long' }"]}],["$","span","code-segement629",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement631",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement632",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 10: Invalid input (non-string password)"]}],["$","span","code-segement633",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement634",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement635",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["try"]}],["$","span","code-segement636",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement637",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement638",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement639",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement640",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement641",{"className":"$undefined","style":{},"children":[" result10 "]}],["$","span","code-segement642",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement643",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement644",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement645",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement646",{"className":"token","style":{"color":"#00e0e0"},"children":["123456"]}],["$","span","code-segement647",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement648",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement649",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement650",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement651",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement652",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement653",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement654",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement655",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement656",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement657",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement658",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement659",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement660",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement661",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement662",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement663",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement664",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement665",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement666",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement667",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement668",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement669",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement670",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement671",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement672",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement673",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement674",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement675",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement676",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement677",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement678",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement679",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement680",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement681",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement682",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement683",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement684",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement685",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement686",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement687",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement688",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement689",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement690",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement691",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement692",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement693",{"className":"token","style":{"color":"#d4d0ab"},"children":["// This will not execute"]}],["$","span","code-segement694",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement695",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement696",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement697",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement698",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["catch"]}],["$","span","code-segement699",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement700",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement701",{"className":"$undefined","style":{},"children":["error"]}],["$","span","code-segement702",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement703",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement704",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement705",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement706",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement707",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement708",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement709",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement710",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement711",{"className":"$undefined","style":{},"children":["error"]}],["$","span","code-segement712",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement713",{"className":"token property-access","style":{},"children":["message"]}],["$","span","code-segement714",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement715",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement716",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement717",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"The input should be a string.\""]}],["$","span","code-segement718",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement719",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement720",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePassword","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassword",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePassword",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Password Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePassword"}]," function is used to validate passwords. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the password meets the specified criteria, and \"errorMsg\" will contain the error message if the password is invalid, or it will be null if the password is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validatePassword "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validatePassword "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["Options"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":[" requireUppercase"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[" requireSpecialChar"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" requireNumber"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" requireString"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement34",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement35",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement37",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" minLength"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" maxLength"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement49",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement52",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" options"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement57",{"className":"token maybe-class-name","style":{},"children":["Options"]}],["$","span","code-segement58",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" errorMsg"]}],["$","span","code-segement61",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement68",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement71",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement75",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement78",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement80",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement81",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement82",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement84",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement86",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement91",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#00e0e0"},"children":["1"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement97",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement98",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[" infinity"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement104",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement107",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement109",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement110",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement111",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement113",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement117",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement119",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement120",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement121",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement122",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement124",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement125",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement126",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement127",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement128",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement129",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement131",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement132",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement133",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement134",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement135",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement136",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement139",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement141",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement142",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement143",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement144",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement148",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement150",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement152",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement153",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement155",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement157",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement158",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement159",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["password"]}],["$","span","code-segement160",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement161",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement162",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement163",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement164",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement165",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement166",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement167",{"className":"token parameter","style":{},"children":["\t\tminLength"]}],["$","span","code-segement168",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement169",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement170",{"className":"token parameter","style":{},"children":["\t\tmaxLength"]}],["$","span","code-segement171",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement172",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement173",{"className":"token parameter","style":{},"children":["\t\toptions"]}],["$","span","code-segement174",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement175",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement176",{"className":"token parameter","style":{},"children":["\t\terrorMsg"]}],["$","span","code-segement177",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement178",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement179",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement180",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement181",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement182",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement183",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement184",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement185",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement186",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement187",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement189",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement190",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement191",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement193",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement194",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement195",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement196",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement197",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement198",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement200",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement201",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement202",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement203",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement204",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement205",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement206",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement207",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"password"}]," (string) - The password to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length allowed for the password. Default value: 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length allowed for the password. Default value: Infinity."]}],["$","li",null,{"children":[["$","code",null,{"children":"options"}]," (object) [optional] - An object with the following optional properties:",["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"requireUppercase"}]," (boolean) - Whether the password requires at least one uppercase letter. Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireSpecialChar"}]," (boolean) - Whether the password requires at least one special character"," ","(e.g., !@#$%^&*(),.?\":{}|\n\t\t\t\t\t\t\t\t\t\t\t\t<>)",". Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireNumber"}]," (boolean) - Whether the password requires at least one number. Default value: false."]}],["$","li",null,{"children":[["$","code",null,{"children":"requireString"}]," (boolean) - Whether the password requires at least one letter. Default value: false."]}]]}]]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'This password is too long'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Password too short'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one capital letter'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one special character'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one number'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Requires at least one letter'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" defaultErrorMsg "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement5",{"className":"token spread","style":{"color":"#00e0e0"},"children":["..."]}],["$","span","code-segement6",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token","style":{"color":"#d4d0ab"},"children":["// ... validatePassword function ..."]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement14",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement15",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Examples:"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1: Valid password with default options"]}],["$","span","code-segement20",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement28",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement31",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement33",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement49",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement51",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement52",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement58",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement61",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement62",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2: Weak password with missing uppercase letter"]}],["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement65",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement67",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement71",{"className":"token","style":{"color":"#abe338"},"children":["\"weakpassword1!\""]}],["$","span","code-segement72",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement74",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement76",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement77",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement78",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement80",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement81",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement83",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement84",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement85",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement87",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement88",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement89",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement90",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement91",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement92",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement95",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement96",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement97",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement98",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement100",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement105",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement106",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement107",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement108",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement110",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement111",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement112",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement113",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement114",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement115",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement116",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement120",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement121",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement122",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one capital letter' }"]}],["$","span","code-segement123",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement125",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement126",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3: Invalid password with too short length"]}],["$","span","code-segement127",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement128",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement129",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement130",{"className":"$undefined","style":{},"children":[" result3 "]}],["$","span","code-segement131",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement132",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement133",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement134",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement135",{"className":"token","style":{"color":"#abe338"},"children":["\"Pwd1!\""]}],["$","span","code-segement136",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement137",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement138",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement139",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement140",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement141",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement142",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement143",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement144",{"className":"token","style":{"color":"#00e0e0"},"children":["10"]}],["$","span","code-segement145",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement146",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement147",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement148",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement149",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement150",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement151",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement152",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement153",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement154",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement155",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement156",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement157",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement158",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement159",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement160",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement161",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement162",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement163",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement164",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement165",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement166",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement167",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement168",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement169",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement170",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement171",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement172",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement173",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement174",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement175",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement176",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement177",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement178",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement179",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement180",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement181",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement182",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement183",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement184",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement185",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement186",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement187",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement188",{"className":"$undefined","style":{},"children":["result3"]}],["$","span","code-segement189",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement190",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement191",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement192",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement193",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'password too short' }"]}],["$","span","code-segement194",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement196",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement197",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 4: Valid password with custom error message"]}],["$","span","code-segement198",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement199",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement200",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement201",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg "]}],["$","span","code-segement202",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement203",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement204",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement205",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement206",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement207",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Invalid format\""]}],["$","span","code-segement208",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement209",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement210",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement211",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Invalid password\""]}],["$","span","code-segement212",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement213",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement214",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement215",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Unknown error\""]}],["$","span","code-segement216",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement217",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement218",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement219",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement220",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement221",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement222",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement223",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement224",{"className":"$undefined","style":{},"children":[" result4 "]}],["$","span","code-segement225",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement226",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement227",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement228",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement229",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement230",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement231",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement232",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement233",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement234",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement235",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement236",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement237",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement238",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement239",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement240",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement241",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement242",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement243",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement244",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement245",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement246",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement247",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement248",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement249",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement250",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement251",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement252",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement253",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement254",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement255",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement256",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement257",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement258",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement259",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement260",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement261",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement262",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement263",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement264",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement265",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement266",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement267",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement268",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement269",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement270",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement271",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement272",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement273",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement274",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement275",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement276",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement277",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement278",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement279",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement280",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement281",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement282",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement283",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement284",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement285",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement286",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement287",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement288",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement289",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg"]}],["$","span","code-segement290",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement291",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement292",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement293",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement294",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement295",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement296",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement297",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement298",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement299",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement300",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement301",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement302",{"className":"$undefined","style":{},"children":["result4"]}],["$","span","code-segement303",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement304",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement305",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement306",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement307",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement308",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement310",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement311",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 5: Invalid password with missing special character"]}],["$","span","code-segement312",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement313",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement314",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement315",{"className":"$undefined","style":{},"children":[" result5 "]}],["$","span","code-segement316",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement317",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement318",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement319",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement320",{"className":"token","style":{"color":"#abe338"},"children":["\"WeakPassword1\""]}],["$","span","code-segement321",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement322",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement323",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement324",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement325",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement326",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement327",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement328",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement329",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement330",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement331",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement332",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement333",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement334",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement335",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement336",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement337",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement338",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement339",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement340",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement341",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement342",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement343",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement344",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement345",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement346",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement347",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement348",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement349",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement350",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement351",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement352",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement353",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement354",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement355",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement356",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement357",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement358",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement359",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement360",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement361",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement362",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement363",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement364",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement365",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement366",{"className":"$undefined","style":{},"children":["result5"]}],["$","span","code-segement367",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement368",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement369",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement370",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement371",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one special character' }"]}],["$","span","code-segement372",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement374",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement375",{"className":"token","style":{"color":"#d4d0ab"},"children":["/*\n"]}],["$","span","code-segement376",{"className":"token","style":{"color":"#d4d0ab"},"children":["Example 6: Valid password with custom error message\n"]}],["$","span","code-segement377",{"className":"token","style":{"color":"#d4d0ab"},"children":["for special character requirement\n"]}],["$","span","code-segement378",{"className":"token","style":{"color":"#d4d0ab"},"children":["*/"]}],["$","span","code-segement379",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement380",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement381",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement382",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg2 "]}],["$","span","code-segement383",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement384",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement385",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement386",{"className":"token spread","style":{"color":"#00e0e0"},"children":["..."]}],["$","span","code-segement387",{"className":"$undefined","style":{},"children":["defaultErrorMsg"]}],["$","span","code-segement388",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement389",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement390",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement391",{"className":"$undefined","style":{},"children":["myCustomErrorMsg2"]}],["$","span","code-segement392",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement393",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement394",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement395",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement396",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement397",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement398",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error: Requires at least one special character\""]}],["$","span","code-segement399",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement400",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement401",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement402",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement403",{"className":"$undefined","style":{},"children":[" result6 "]}],["$","span","code-segement404",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement405",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement406",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement407",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement408",{"className":"token","style":{"color":"#abe338"},"children":["\"MyP@ssw0rd\""]}],["$","span","code-segement409",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement410",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement411",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement412",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement413",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement414",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement415",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement416",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement417",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement418",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement419",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement420",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement421",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement422",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement423",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement424",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement425",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement426",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement427",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement428",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement429",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement430",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement431",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement432",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement433",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireSpecialChar"]}],["$","span","code-segement434",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement435",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement436",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement437",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement438",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement439",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement440",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement441",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement442",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement443",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement444",{"className":"$undefined","style":{},"children":[" myCustomErrorMsg2"]}],["$","span","code-segement445",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement446",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement447",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement448",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement449",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement450",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement451",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement452",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement453",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement454",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement455",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement456",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement457",{"className":"$undefined","style":{},"children":["result6"]}],["$","span","code-segement458",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement459",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement460",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement461",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement462",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement463",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement465",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement466",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 7: Invalid password with missing number"]}],["$","span","code-segement467",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement468",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement469",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement470",{"className":"$undefined","style":{},"children":[" result7 "]}],["$","span","code-segement471",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement472",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement473",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement474",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement475",{"className":"token","style":{"color":"#abe338"},"children":["\"StrongPwd@\""]}],["$","span","code-segement476",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement477",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement478",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement479",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement480",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement481",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement482",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement483",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement484",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement485",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement486",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement487",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement488",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement489",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement490",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement491",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement492",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement493",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement494",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement495",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement496",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement497",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement498",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement499",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement500",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireNumber"]}],["$","span","code-segement501",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement502",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement503",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement504",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement505",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement506",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement507",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement508",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement509",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement510",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement511",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement512",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement513",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement514",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement515",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement516",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement517",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement518",{"className":"$undefined","style":{},"children":["result7"]}],["$","span","code-segement519",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement520",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement521",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement522",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement523",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one number' }"]}],["$","span","code-segement524",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement526",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement527",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 8: Invalid password with missing letter"]}],["$","span","code-segement528",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement529",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement530",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement531",{"className":"$undefined","style":{},"children":[" result8 "]}],["$","span","code-segement532",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement533",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement534",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement535",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement536",{"className":"token","style":{"color":"#abe338"},"children":["\"12345@#\""]}],["$","span","code-segement537",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement538",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement539",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement540",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement541",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement542",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement543",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement544",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement545",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement546",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement547",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement548",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement549",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement550",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement551",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement552",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement553",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement554",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement555",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement556",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement557",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement558",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement559",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement560",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement561",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireString"]}],["$","span","code-segement562",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement563",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement564",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement565",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement566",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement567",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement568",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement569",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement570",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement571",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement572",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement573",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement574",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement575",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement576",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement577",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement578",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement579",{"className":"$undefined","style":{},"children":["result8"]}],["$","span","code-segement580",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement581",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement582",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement583",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement584",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Requires at least one letter' }"]}],["$","span","code-segement585",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement587",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement588",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 9: Invalid password exceeding maximum length"]}],["$","span","code-segement589",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement590",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement591",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement592",{"className":"$undefined","style":{},"children":[" result9 "]}],["$","span","code-segement593",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement594",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement595",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement596",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement597",{"className":"token","style":{"color":"#abe338"},"children":["\"VeryLongPassword1234567890!@#$%^\""]}],["$","span","code-segement598",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement599",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement600",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement601",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement602",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement603",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement604",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement605",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement606",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement607",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement608",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement609",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement610",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement611",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement612",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement613",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement614",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement615",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement616",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement617",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement618",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement619",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement620",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement621",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement622",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement623",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement624",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement625",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement626",{"className":"$undefined","style":{},"children":["result9"]}],["$","span","code-segement627",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement628",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement629",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement630",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement631",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'This password is too long' }"]}],["$","span","code-segement632",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement634",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement635",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 10: Invalid input (non-string password)"]}],["$","span","code-segement636",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement637",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement638",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["try"]}],["$","span","code-segement639",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement640",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement641",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement642",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement643",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement644",{"className":"$undefined","style":{},"children":[" result10 "]}],["$","span","code-segement645",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement646",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement647",{"className":"token","style":{"color":"#ffd700"},"children":["validatePassword"]}],["$","span","code-segement648",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement649",{"className":"token","style":{"color":"#00e0e0"},"children":["123456"]}],["$","span","code-segement650",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement651",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement652",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement653",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement654",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement655",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement656",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement657",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement658",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement659",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement660",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement661",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement662",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement663",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement664",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement665",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement666",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement667",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement668",{"className":"$undefined","style":{},"children":["\t\t"]}],["$","span","code-segement669",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["options"]}],["$","span","code-segement670",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement671",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement672",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement673",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement674",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["requireUppercase"]}],["$","span","code-segement675",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement676",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement677",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement678",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement679",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement680",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement681",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement682",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement683",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement684",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement685",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement686",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement687",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement688",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement689",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement690",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement691",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement692",{"className":"$undefined","style":{},"children":["result10"]}],["$","span","code-segement693",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement694",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement695",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement696",{"className":"token","style":{"color":"#d4d0ab"},"children":["// This will not execute"]}],["$","span","code-segement697",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement698",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement699",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement700",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement701",{"className":"token control-flow","style":{"color":"#00e0e0"},"children":["catch"]}],["$","span","code-segement702",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement703",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement704",{"className":"$undefined","style":{},"children":["error"]}],["$","span","code-segement705",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement706",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement707",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement708",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement709",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement710",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement711",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement712",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement713",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement714",{"className":"$undefined","style":{},"children":["error"]}],["$","span","code-segement715",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement716",{"className":"token property-access","style":{},"children":["message"]}],["$","span","code-segement717",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement718",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement719",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement720",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: \"The input should be a string.\""]}],["$","span","code-segement721",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement722",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement723",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePassword","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validatePhoneNumber.html b/docs/page/documentation/js/functions/validatePhoneNumber.html index 0f3e6e9..2489183 100644 --- a/docs/page/documentation/js/functions/validatePhoneNumber.html +++ b/docs/page/documentation/js/functions/validatePhoneNumber.html @@ -1,4 +1,4 @@ -Documentation

Phone Number Validation Function Documentation

The validatePhoneNumber function is used to validate phone numbers. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the phone number meets the specified criteria, and 'errorMsg' will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Function Signature

function validatePhoneNumber(
+Documentation

Phone Number Validation Function Documentation

The validatePhoneNumber function is used to validate phone numbers. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the phone number meets the specified criteria, and 'errorMsg' will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Function Signature

function validatePhoneNumber(
 	phoneNumber: string,
 	errorMsg?: string[]
 ): { isValid: boolean, errorMsg: string | null };

Parameters

  • phoneNumber (string) - The phone number to be validated.
  • errorMsg (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.

Default Error Messages

[
@@ -12,4 +12,4 @@
 const customErrorMsg = [null, 'Custom error 2'];
 const result2 = validatePhoneNumber('(555) 123-4567', customErrorMsg);
 console.log(result2);
-// Output: { isValid: false, errorMsg: 'Custom error 2' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Custom error 2' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validatePhoneNumber.txt b/docs/page/documentation/js/functions/validatePhoneNumber.txt index 07f1a9c..c9b539b 100644 --- a/docs/page/documentation/js/functions/validatePhoneNumber.txt +++ b/docs/page/documentation/js/functions/validatePhoneNumber.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2989","static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-315f6ade253e27cc.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","2989","static/chunks/app/(doc-session)/documentation/js/functions/validatePhoneNumber/page-8a1cc0bdb269792d.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePhoneNumber"}]," function is used to validate phone numbers. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the phone number meets the specified criteria, and 'errorMsg' will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["phoneNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\terrorMsg"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement13",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'555-123-4567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 2'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'(555) 123-4567'"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement50",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement52",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Custom error 2' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validatePhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validatePhoneNumber"}]," function is used to validate phone numbers. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the phone number meets the specified criteria, and 'errorMsg' will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["phoneNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\terrorMsg"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement13",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement15",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'555-123-4567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 2'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#ffd700"},"children":["validatePhoneNumber"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'(555) 123-4567'"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement50",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement52",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Custom error 2' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validatePhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateSurname.html b/docs/page/documentation/js/functions/validateSurname.html index 7e535c4..dc2aa6e 100644 --- a/docs/page/documentation/js/functions/validateSurname.html +++ b/docs/page/documentation/js/functions/validateSurname.html @@ -1,4 +1,4 @@ -Documentation

Surname Validation Function Documentation

The validateSurname function is used to validate surnames. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the surname meets the specified criteria, and 'errorMsg' will contain the error message if the surname is invalid, or it will be null if the surname is valid.

Function Signature

function validateSurname(
+Documentation

Surname Validation Function Documentation

The validateSurname function is used to validate surnames. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the surname meets the specified criteria, and 'errorMsg' will contain the error message if the surname is invalid, or it will be null if the surname is valid.

Function Signature

function validateSurname(
 	surname: string,
 	{
 		minLength?: number,
@@ -26,4 +26,4 @@
     errorMsg: customErrorMsg,
 });
 console.log(result2);
-// Output: { isValid: false, errorMsg: 'Surname cannot contain special characters' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Surname cannot contain special characters' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateSurname.txt b/docs/page/documentation/js/functions/validateSurname.txt index 1599b5f..70335a8 100644 --- a/docs/page/documentation/js/functions/validateSurname.txt +++ b/docs/page/documentation/js/functions/validateSurname.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6200","static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-15cf292c959a315a.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","6200","static/chunks/app/(doc-session)/documentation/js/functions/validateSurname/page-5f8e23aa38c72a30.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateSurname",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateSurname",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Surname Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateSurname"}]," function is used to validate surnames. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the surname meets the specified criteria, and 'errorMsg' will contain the error message if the surname is invalid, or it will be null if the surname is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["surname"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement13",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":["\t\tminLength"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement17",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement18",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement19",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement20",{"className":"token parameter","style":{},"children":["\t\tmaxLength"]}],["$","span","code-segement21",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement22",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement24",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"token parameter","style":{},"children":["\t\terrorMsg"]}],["$","span","code-segement27",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement28",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement29",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement30",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement32",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement33",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement34",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"surname"}]," (string) - The surname to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length of the surname. Default is 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length of the surname. Default is 25."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Surname cannot contain numbers'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Surname cannot contain special characters'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This surname is not valid'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Surname too big, try again'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"Jackson\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement49",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 2\""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement61",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["\"J@ckson\""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement94",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement96",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Surname cannot contain special characters' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateSurname","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateSurname",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateSurname",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Surname Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateSurname"}]," function is used to validate surnames. It returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string). The 'isValid' property will be true if the surname meets the specified criteria, and 'errorMsg' will contain the error message if the surname is invalid, or it will be null if the surname is valid."]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["surname"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement13",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":["\t\tminLength"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement17",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement18",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement19",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement20",{"className":"token parameter","style":{},"children":["\t\tmaxLength"]}],["$","span","code-segement21",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement22",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement23",{"className":"token parameter","style":{},"children":[" number"]}],["$","span","code-segement24",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"token parameter","style":{},"children":["\t\terrorMsg"]}],["$","span","code-segement27",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement28",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement29",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement30",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement32",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement33",{"className":"token parameter","style":{},"children":["\t"]}],["$","span","code-segement34",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement38",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement43",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement45",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement47",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement48",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"surname"}]," (string) - The surname to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length of the surname. Default is 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length of the surname. Default is 25."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Surname cannot contain numbers'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Surname cannot contain special characters'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'This surname is not valid'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Surname too big, try again'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"Jackson\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement49",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 2\""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement61",{"className":"token","style":{"color":"#ffd700"},"children":["validateSurname"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["\"J@ckson\""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["3"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["25"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement94",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement96",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Surname cannot contain special characters' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateSurname","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateTextarea.html b/docs/page/documentation/js/functions/validateTextarea.html index b758ecf..79c3804 100644 --- a/docs/page/documentation/js/functions/validateTextarea.html +++ b/docs/page/documentation/js/functions/validateTextarea.html @@ -1,4 +1,4 @@ -Documentation

validateTextarea Function

This function is a text area validation utility that checks the validity of a given textarea string based on certain criteria.

Function Signature

/**
+Documentation

validateTextarea Function

This function is a text area validation utility that checks the validity of a given textarea string based on certain criteria.

Function Signature

/**
 * @param {string} textarea - The input textarea string to be validated.
 * @param {boolean} [isRequired=false] - A boolean flag to determine if the textarea is required (default: false).
 * @param {number} [maxLength=50] - The maximum allowed length for the textarea (default: 50).
@@ -17,4 +17,4 @@
 // Returns: { isValid: false, errorMsg: 'Can not be empty' }
 
 validateTextarea("Very long text...", { isRequired: false, maxLength: 10 }); // Example 3
-// Returns: { isValid: false, errorMsg: 'This textarea is too big' }

Note: The examples provided demonstrate how to use the function with different parameters and show the expected return values.

\ No newline at end of file +
// Returns: { isValid: false, errorMsg: 'This textarea is too big' }

Note: The examples provided demonstrate how to use the function with different parameters and show the expected return values.

\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateTextarea.txt b/docs/page/documentation/js/functions/validateTextarea.txt index 9c650b0..c3c36f6 100644 --- a/docs/page/documentation/js/functions/validateTextarea.txt +++ b/docs/page/documentation/js/functions/validateTextarea.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","697","static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-7d512d42c9360722.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","697","static/chunks/app/(doc-session)/documentation/js/functions/validateTextarea/page-f8077fc83b19e1ad.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateTextarea",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateTextarea",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"children":"validateTextarea Function"}],["$","p",null,{"children":"This function is a text area validation utility that checks the validity of a given textarea string based on certain criteria."}],["$","h2",null,{"children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["/**\n"]}],["$","span","code-segement1",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement2",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement3",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement4",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["string"]}],["$","span","code-segement6",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement8",{"className":"token doc-comment parameter","style":{"color":"#d4d0ab"},"children":["textarea"]}],["$","span","code-segement9",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - The input textarea string to be validated.\n"]}],["$","span","code-segement10",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement11",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement12",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement13",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement14",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["boolean"]}],["$","span","code-segement15",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement16",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement17",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement18",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["isRequired"]}],["$","span","code-segement19",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement20",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["false"]}],["$","span","code-segement21",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement22",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - A boolean flag to determine if the textarea is required (default: false).\n"]}],["$","span","code-segement23",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement24",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement25",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement26",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement27",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["number"]}],["$","span","code-segement28",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement29",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement30",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["maxLength"]}],["$","span","code-segement32",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement33",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["50"]}],["$","span","code-segement34",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement35",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - The maximum allowed length for the textarea (default: 50).\n"]}],["$","span","code-segement36",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement37",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement38",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement39",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement40",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["string"]}],["$","span","code-segement41",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement42",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement43",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement44",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement45",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement46",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["errorMsg"]}],["$","span","code-segement47",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement48",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["defaultErrorMsg"]}],["$","span","code-segement49",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement50",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - An array of custom error messages for different validation conditions (default: predefined messages).\n"]}],["$","span","code-segement51",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement52",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@default"]}],["$","span","code-segement53",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" isRequired boolean: default: false\n"]}],["$","span","code-segement54",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement55",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@default"]}],["$","span","code-segement56",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" maxLength number: default: 50\n"]}],["$","span","code-segement57",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement58",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement59",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement60",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement61",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement62",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement63",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement64",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement65",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement66",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement67",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement68",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement69",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement70",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement71",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement72",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement73",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement74",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement75",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement76",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement77",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement78",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement79",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement80",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement81",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement82",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@description"]}],["$","span","code-segement83",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" This function returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string).\n"]}],["$","span","code-segement84",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* The 'isValid' property indicates if the textarea is valid based on the given criteria, and 'errorMsg' contains the corresponding error message, if any.\n"]}],["$","span","code-segement85",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["*/"]}]]]}]}],["$","h2",null,{"children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"textarea"}]," (string): The input textarea string to be validated."]}],["$","li",null,{"children":[["$","strong",null,{"children":"isRequired"}]," (boolean, optional, default: false): A flag to determine if the textarea is required."]}],["$","li",null,{"children":[["$","strong",null,{"children":"maxLength"}]," (number, optional, default: 50): The maximum allowed length for the textarea."]}],["$","li",null,{"children":[["$","strong",null,{"children":"errorMsg"}]," (string array, optional, default: predefined messages): An array of custom error messages for different validation conditions. The array should contain three elements corresponding to different error scenarios. If not provided, default error messages will be used. Default Error Messages:",["$","ul",null,{"children":[["$","li",null,{"children":"Index 0: 'This textarea is too big'"}],["$","li",null,{"children":"Index 1: 'Can not be empty'"}],["$","li",null,{"children":"Index 2: 'Unknown error'"}]]}]]}]]}],["$","h2",null,{"children":"Return Value"}],["$","p",null,{"children":["The function returns an object with two properties:",["$","ul",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"isValid"}]," (boolean): Indicates if the textarea is valid based on the given criteria."]}],["$","li",null,{"children":[["$","strong",null,{"children":"errorMsg"}]," (string): Contains the corresponding error message, if any, based on the validation result."]}]]}]]}],["$","h2",null,{"children":"Usage Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement1",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement2",{"className":"token","style":{"color":"#abe338"},"children":["\"Some text content\""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement9",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: true, errorMsg: null }"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement12",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement13",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["\"\""]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isRequired"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement32",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: false, errorMsg: 'Can not be empty' }"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement38",{"className":"token","style":{"color":"#abe338"},"children":["\"Very long text...\""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement43",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isRequired"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["10"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement58",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement61",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: false, errorMsg: 'This textarea is too big' }"]}]]]}]}],["$","p",null,{"children":[["$","strong",null,{"children":"Note:"}]," The examples provided demonstrate how to use the function with different parameters and show the expected return values."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateTextarea","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateTextarea",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateTextarea",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"children":"validateTextarea Function"}],["$","p",null,{"children":"This function is a text area validation utility that checks the validity of a given textarea string based on certain criteria."}],["$","h2",null,{"children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["/**\n"]}],["$","span","code-segement1",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement2",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement3",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement4",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["string"]}],["$","span","code-segement6",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement7",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement8",{"className":"token doc-comment parameter","style":{"color":"#d4d0ab"},"children":["textarea"]}],["$","span","code-segement9",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - The input textarea string to be validated.\n"]}],["$","span","code-segement10",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement11",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement12",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement13",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement14",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["boolean"]}],["$","span","code-segement15",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement16",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement17",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement18",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["isRequired"]}],["$","span","code-segement19",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement20",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["false"]}],["$","span","code-segement21",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement22",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - A boolean flag to determine if the textarea is required (default: false).\n"]}],["$","span","code-segement23",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement24",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement25",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement26",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement27",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["number"]}],["$","span","code-segement28",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement29",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement30",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement31",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["maxLength"]}],["$","span","code-segement32",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement33",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["50"]}],["$","span","code-segement34",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement35",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - The maximum allowed length for the textarea (default: 50).\n"]}],["$","span","code-segement36",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement37",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@param"]}],["$","span","code-segement38",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement39",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement40",{"className":"token doc-comment class-name","style":{"color":"#d4d0ab"},"children":["string"]}],["$","span","code-segement41",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement42",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement43",{"className":"token doc-comment class-name","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement44",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement45",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement46",{"className":"token doc-comment optional-parameter parameter","style":{"color":"#d4d0ab"},"children":["errorMsg"]}],["$","span","code-segement47",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["="]}],["$","span","code-segement48",{"className":"token doc-comment optional-parameter code language-javascript","style":{"color":"#d4d0ab"},"children":["defaultErrorMsg"]}],["$","span","code-segement49",{"className":"token doc-comment optional-parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement50",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" - An array of custom error messages for different validation conditions (default: predefined messages).\n"]}],["$","span","code-segement51",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement52",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@default"]}],["$","span","code-segement53",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" isRequired boolean: default: false\n"]}],["$","span","code-segement54",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement55",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@default"]}],["$","span","code-segement56",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" maxLength number: default: 50\n"]}],["$","span","code-segement57",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement58",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement59",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement60",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement61",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement62",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement63",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement64",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement65",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement66",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement67",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement68",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement69",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement70",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement71",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement72",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement73",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement74",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@example"]}],["$","span","code-segement75",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" "]}],["$","span","code-segement76",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["validateTextarea"]}],["$","span","code-segement77",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":["("]}],["$","span","code-segement78",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[")"]}],["$","span","code-segement79",{"className":"token doc-comment example code language-javascript","style":{"color":"#d4d0ab"},"children":[";"]}],["$","span","code-segement80",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["\n"]}],["$","span","code-segement81",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* "]}],["$","span","code-segement82",{"className":"token doc-comment","style":{"color":"#00e0e0"},"children":["@description"]}],["$","span","code-segement83",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":[" This function returns an object with two properties: 'isValid' (boolean) and 'errorMsg' (string).\n"]}],["$","span","code-segement84",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["* The 'isValid' property indicates if the textarea is valid based on the given criteria, and 'errorMsg' contains the corresponding error message, if any.\n"]}],["$","span","code-segement85",{"className":"token doc-comment","style":{"color":"#d4d0ab"},"children":["*/"]}]]]}]}],["$","h2",null,{"children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"textarea"}]," (string): The input textarea string to be validated."]}],["$","li",null,{"children":[["$","strong",null,{"children":"isRequired"}]," (boolean, optional, default: false): A flag to determine if the textarea is required."]}],["$","li",null,{"children":[["$","strong",null,{"children":"maxLength"}]," (number, optional, default: 50): The maximum allowed length for the textarea."]}],["$","li",null,{"children":[["$","strong",null,{"children":"errorMsg"}]," (string array, optional, default: predefined messages): An array of custom error messages for different validation conditions. The array should contain three elements corresponding to different error scenarios. If not provided, default error messages will be used. Default Error Messages:",["$","ul",null,{"children":[["$","li",null,{"children":"Index 0: 'This textarea is too big'"}],["$","li",null,{"children":"Index 1: 'Can not be empty'"}],["$","li",null,{"children":"Index 2: 'Unknown error'"}]]}]]}]]}],["$","h2",null,{"children":"Return Value"}],["$","p",null,{"children":["The function returns an object with two properties:",["$","ul",null,{"children":[["$","li",null,{"children":[["$","strong",null,{"children":"isValid"}]," (boolean): Indicates if the textarea is valid based on the given criteria."]}],["$","li",null,{"children":[["$","strong",null,{"children":"errorMsg"}]," (string): Contains the corresponding error message, if any, based on the validation result."]}]]}]]}],["$","h2",null,{"children":"Usage Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement1",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement2",{"className":"token","style":{"color":"#abe338"},"children":["\"Some text content\""]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 1"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement9",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: true, errorMsg: null }"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement12",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement13",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["\"\""]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement18",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement20",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isRequired"]}],["$","span","code-segement21",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement23",{"className":"token","style":{"color":"#00e0e0"},"children":["true"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement25",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 2"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement32",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: false, errorMsg: 'Can not be empty' }"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement35",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement36",{"className":"token","style":{"color":"#ffd700"},"children":["validateTextarea"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement38",{"className":"token","style":{"color":"#abe338"},"children":["\"Very long text...\""]}],["$","span","code-segement39",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement43",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isRequired"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["false"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["10"]}],["$","span","code-segement53",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement58",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Example 3"]}],["$","span","code-segement59",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement61",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Returns: { isValid: false, errorMsg: 'This textarea is too big' }"]}]]]}]}],["$","p",null,{"children":[["$","strong",null,{"children":"Note:"}]," The examples provided demonstrate how to use the function with different parameters and show the expected return values."]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateTextarea","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateUSPhoneNumber.html b/docs/page/documentation/js/functions/validateUSPhoneNumber.html index ec191e1..3ad6529 100644 --- a/docs/page/documentation/js/functions/validateUSPhoneNumber.html +++ b/docs/page/documentation/js/functions/validateUSPhoneNumber.html @@ -1,4 +1,4 @@ -Documentation

US Phone Number Validation Function Documentation

The validateUSPhoneNumber function is used to validate US phone numbers. It supports various formats, including "XXX-XXX-XXXX", "(XXX) XXX-XXXX", and "1 (XXX) XXX-XXXX". It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the phone number is valid, and "errorMsg" will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validateUSPhoneNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateUSPhoneNumber } = require('multiform-validator');

Function Signature

function validateUSPhoneNumber(
+Documentation

US Phone Number Validation Function Documentation

The validateUSPhoneNumber function is used to validate US phone numbers. It supports various formats, including "XXX-XXX-XXXX", "(XXX) XXX-XXXX", and "1 (XXX) XXX-XXXX". It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the phone number is valid, and "errorMsg" will contain the error message if the phone number is invalid, or it will be null if the phone number is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import { validateUSPhoneNumber } from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const { validateUSPhoneNumber } = require('multiform-validator');

Function Signature

function validateUSPhoneNumber(
 	phoneNumber: string,
 	errorMsg?: string[]
 ): { isValid: boolean, errorMsg: string | null };

Parameters

  • phoneNumber (string) - The US phone number to be validated.
  • errorMsg (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.

Default Error Messages

[
@@ -12,4 +12,4 @@
 const customErrorMsg = ['Custom error 1', 'Custom error 2'];
 const result2 = validateUSPhoneNumber('(555) 123-4567', customErrorMsg);
 console.log(result2);
-// Output: { isValid: false, errorMsg: 'Invalid phone number' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Invalid phone number' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateUSPhoneNumber.txt b/docs/page/documentation/js/functions/validateUSPhoneNumber.txt index ebcd8ad..25e62f1 100644 --- a/docs/page/documentation/js/functions/validateUSPhoneNumber.txt +++ b/docs/page/documentation/js/functions/validateUSPhoneNumber.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3635","static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-1cd06cd02bdba35b.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","3635","static/chunks/app/(doc-session)/documentation/js/functions/validateUSPhoneNumber/page-35957ed8c75d1512.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUSPhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUSPhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"US Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateUSPhoneNumber"}]," function is used to validate US phone numbers. It supports various formats, including \"XXX-XXX-XXXX\", \"(XXX) XXX-XXXX\", and \"1 (XXX) XXX-XXXX\". It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the phone number is valid, and \"errorMsg\" will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateUSPhoneNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateUSPhoneNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["phoneNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\terrorMsg"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement13",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The US phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'555-123-4567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 1'"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 2'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'(555) 123-4567'"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement50",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement52",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateUSPhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUSPhoneNumber",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUSPhoneNumber",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"US Phone Number Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateUSPhoneNumber"}]," function is used to validate US phone numbers. It supports various formats, including \"XXX-XXX-XXXX\", \"(XXX) XXX-XXXX\", and \"1 (XXX) XXX-XXXX\". It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the phone number is valid, and \"errorMsg\" will contain the error message if the phone number is invalid, or it will be null if the phone number is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":[" validateUSPhoneNumber "]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" validateUSPhoneNumber "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement6",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["phoneNumber"]}],["$","span","code-segement7",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement8",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement9",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement10",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"token parameter","style":{},"children":["\terrorMsg"]}],["$","span","code-segement12",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement13",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement15",{"className":"token parameter","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement16",{"className":"token parameter","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement19",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement24",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement25",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement29",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"phoneNumber"}]," (string) - The US phone number to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid phone number'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["'555-123-4567'"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement11",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement13",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement17",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement19",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement20",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement23",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement26",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 1'"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"token","style":{"color":"#abe338"},"children":["'Custom error 2'"]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement39",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement41",{"className":"token","style":{"color":"#ffd700"},"children":["validateUSPhoneNumber"]}],["$","span","code-segement42",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement43",{"className":"token","style":{"color":"#abe338"},"children":["'(555) 123-4567'"]}],["$","span","code-segement44",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement47",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement49",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement50",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement51",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement52",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement55",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement56",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement57",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement59",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Invalid phone number' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateUSPhoneNumber","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/documentation/js/functions/validateUsername.html b/docs/page/documentation/js/functions/validateUsername.html index 486e054..af8dd11 100644 --- a/docs/page/documentation/js/functions/validateUsername.html +++ b/docs/page/documentation/js/functions/validateUsername.html @@ -1,4 +1,4 @@ -Documentation

Username Validation Function Documentation

The validateUsername function is used to validate usernames. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the username meets the specified criteria, and "errorMsg" will contain the error message if the username is invalid, or it will be null if the username is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import {validateUsername} from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const {validateUsername} = require('multiform-validator');

Function Signature

interface OptionsParams {
+Documentation

Username Validation Function Documentation

The validateUsername function is used to validate usernames. It returns an object with two properties: "isValid" (boolean) and "errorMsg" (string). The "isValid" property will be true if the username meets the specified criteria, and "errorMsg" will contain the error message if the username is invalid, or it will be null if the username is valid.

Import

The function can be imported using ES6 syntax from the "multiform-validator" package:

import {validateUsername} from 'multiform-validator';

Alternatively, you can import the function using CommonJS syntax with require (Node.js):

const {validateUsername} = require('multiform-validator');

Function Signature

interface OptionsParams {
 	minLength?: number;
 	maxLength?: number;
 	errorMsg?: (string | null)[];
@@ -35,4 +35,4 @@
     errorMsg: customErrorMsg,
 });
 console.log(result2);
-// Output: { isValid: false, errorMsg: 'Username too short' }
\ No newline at end of file +
// Output: { isValid: false, errorMsg: 'Username too short' }
\ No newline at end of file diff --git a/docs/page/documentation/js/functions/validateUsername.txt b/docs/page/documentation/js/functions/validateUsername.txt index 977e0ef..f7c6986 100644 --- a/docs/page/documentation/js/functions/validateUsername.txt +++ b/docs/page/documentation/js/functions/validateUsername.txt @@ -1,4 +1,4 @@ -2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7759","static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-4db27d24a9ab8990.js"],"default"] +2:I[5476,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","231","static/chunks/231-bff31d3970707cb0.js","5","static/chunks/5-3fe5b665c01a2eb0.js","7759","static/chunks/app/(doc-session)/documentation/js/functions/validateUsername/page-556ec8e586a34161.js"],"default"] 3:I[9275,[],""] 4:I[1343,[],""] 5:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] @@ -7,6 +7,6 @@ a:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chu 7:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} 8:{"display":"inline-block"} 9:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUsername",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUsername",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Username Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateUsername"}]," function is used to validate usernames. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the username meets the specified criteria, and \"errorMsg\" will contain the error message if the username is invalid, or it will be null if the username is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":["validateUsername"]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":["validateUsername"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\tminLength"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\tmaxLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\terrorMsg"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["1"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" infinity"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement72",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement73",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement75",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["username"]}],["$","span","code-segement80",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement81",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement82",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement83",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement86",{"className":"token parameter","style":{},"children":[" minLength"]}],["$","span","code-segement87",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement88",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement89",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement90",{"className":"token parameter","style":{},"children":[" errorMsg "]}],["$","span","code-segement91",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement92",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement95",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement96",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement97",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement98",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement106",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement107",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement111",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement114",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement116",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"username"}]," (string) - The username to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length of the username. Default is 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length of the username. Default is Infinity."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Username too short'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'This username is too long'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'Username cannot contain spaces'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Cannot start with a number'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Cannot contain only numbers'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"User999\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement49",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 1\""]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 2\""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement61",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["\"User999\""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement94",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement96",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Username too short' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateUsername","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUsername",{"children":["__PAGE__",{}]}]}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(doc-session)",{"children":["documentation",{"children":["js",{"children":["functions",{"children":["validateUsername",{"children":["__PAGE__",{},[["$L1",["$","div",null,{"id":"page-content-wrapper","children":[["$","div",null,{"className":"relative mr-10 flex justify-end p-4","children":["$","$L2",null,{}]}],["$","div",null,{"className":"container-fluid container","children":[["$","h1",null,{"className":"title","children":"Username Validation Function Documentation"}],["$","p",null,{"children":["The ",["$","code",null,{"children":"validateUsername"}]," function is used to validate usernames. It returns an object with two properties: \"isValid\" (boolean) and \"errorMsg\" (string). The \"isValid\" property will be true if the username meets the specified criteria, and \"errorMsg\" will contain the error message if the username is invalid, or it will be null if the username is valid."]}],["$","h2",null,{"className":"subtitle","children":"Import"}],["$","p",null,{"children":"The function can be imported using ES6 syntax from the \"multiform-validator\" package:"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token module","style":{"color":"#00e0e0"},"children":["import"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token imports","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"token imports","style":{},"children":["validateUsername"]}],["$","span","code-segement4",{"className":"token imports","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token module","style":{"color":"#00e0e0"},"children":["from"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","p",null,{"children":["Alternatively, you can import the function using CommonJS syntax with"," ",["$","code",null,{"children":"require"}]," (Node.js):"]}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":["validateUsername"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"token","style":{"color":"#ffd700"},"children":["require"]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement10",{"className":"token","style":{"color":"#abe338"},"children":["'multiform-validator'"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Function Signature"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["interface"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\tminLength"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement10",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":["\tmaxLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement14",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" number"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\terrorMsg"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#00e0e0"},"children":["?"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":["string "]}],["$","span","code-segement24",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement29",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement32",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement33",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement36",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement37",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement39",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["defaultOptionsParams"]}],["$","span","code-segement40",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement42",{"className":"token maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement49",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement50",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#00e0e0"},"children":["1"]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement54",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement56",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" infinity"]}],["$","span","code-segement59",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement61",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement62",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement63",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement64",{"className":"$undefined","style":{},"children":[" defaultErrorMsg"]}],["$","span","code-segement65",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement66",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement68",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement69",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement70",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement72",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement73",{"className":"token","style":{"color":"#00e0e0"},"children":["function"]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement75",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement76",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement77",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token parameter literal-property","style":{"color":"#ffa07a"},"children":["username"]}],["$","span","code-segement80",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement81",{"className":"token parameter","style":{},"children":[" string"]}],["$","span","code-segement82",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement83",{"className":"token parameter","style":{},"children":["\n"]}],["$","span","code-segement84",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement85",{"className":"token parameter","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement86",{"className":"token parameter","style":{},"children":[" minLength"]}],["$","span","code-segement87",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement88",{"className":"token parameter","style":{},"children":[" maxLength"]}],["$","span","code-segement89",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement90",{"className":"token parameter","style":{},"children":[" errorMsg "]}],["$","span","code-segement91",{"className":"token parameter","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement92",{"className":"token parameter","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement93",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement94",{"className":"token parameter maybe-class-name","style":{},"children":["OptionsParams"]}],["$","span","code-segement95",{"className":"token parameter","style":{},"children":[" "]}],["$","span","code-segement96",{"className":"token parameter","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement97",{"className":"token parameter","style":{},"children":[" defaultOptionsParams"]}],["$","span","code-segement98",{"className":"token parameter","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement99",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement100",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement101",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement102",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement104",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement105",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement106",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["isValid"]}],["$","span","code-segement107",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" boolean"]}],["$","span","code-segement109",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement110",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement111",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement112",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement113",{"className":"$undefined","style":{},"children":[" string "]}],["$","span","code-segement114",{"className":"token","style":{"color":"#00e0e0"},"children":["|"]}],["$","span","code-segement115",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement116",{"className":"token null nil","style":{"color":"#00e0e0"},"children":["null"]}],["$","span","code-segement117",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement118",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement119",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Parameters"}],["$","ul",null,{"children":[["$","li",null,{"children":[["$","code",null,{"children":"username"}]," (string) - The username to be validated."]}],["$","li",null,{"children":[["$","code",null,{"children":"minLength"}]," (number) [optional] - The minimum length of the username. Default is 1."]}],["$","li",null,{"children":[["$","code",null,{"children":"maxLength"}]," (number) [optional] - The maximum length of the username. Default is Infinity."]}],["$","li",null,{"children":[["$","code",null,{"children":"errorMsg"}]," (string[]) [optional] - An array of error messages to customize the response. If not provided, the function will use default error messages."]}]]}],["$","h2",null,{"className":"subtitle","children":"Default Error Messages"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement3",{"className":"token","style":{"color":"#abe338"},"children":["'Invalid value passed'"]}],["$","span","code-segement4",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement7",{"className":"token","style":{"color":"#abe338"},"children":["'Username too short'"]}],["$","span","code-segement8",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement11",{"className":"token","style":{"color":"#abe338"},"children":["'This username is too long'"]}],["$","span","code-segement12",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement15",{"className":"token","style":{"color":"#abe338"},"children":["'Username cannot contain spaces'"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement19",{"className":"token","style":{"color":"#abe338"},"children":["'Cannot start with a number'"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement22",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#abe338"},"children":["'Cannot contain only numbers'"]}],["$","span","code-segement24",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":["\t"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#abe338"},"children":["'Unknown error'"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement30",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}]]]}]}],["$","h2",null,{"className":"subtitle","children":"Examples"}],["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-javascript","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" result1 "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement4",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement5",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement6",{"className":"token","style":{"color":"#abe338"},"children":["\"User999\""]}],["$","span","code-segement7",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement9",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement13",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement15",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement16",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement19",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement20",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement23",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement26",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement27",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement28",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement30",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement31",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement32",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement33",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement34",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":["result1"]}],["$","span","code-segement36",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement37",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement40",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: true, errorMsg: null }"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":["\n"]}],"\n",["$","span","code-segement43",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement44",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement45",{"className":"$undefined","style":{},"children":[" customErrorMsg "]}],["$","span","code-segement46",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement47",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement48",{"className":"token","style":{"color":"#fefefe"},"children":["["]}],["$","span","code-segement49",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 1\""]}],["$","span","code-segement50",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement51",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement52",{"className":"token","style":{"color":"#abe338"},"children":["\"Custom error 2\""]}],["$","span","code-segement53",{"className":"token","style":{"color":"#fefefe"},"children":["]"]}],["$","span","code-segement54",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement55",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement56",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement57",{"className":"token","style":{"color":"#00e0e0"},"children":["const"]}],["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" result2 "]}],["$","span","code-segement59",{"className":"token","style":{"color":"#00e0e0"},"children":["="]}],["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement61",{"className":"token","style":{"color":"#ffd700"},"children":["validateUsername"]}],["$","span","code-segement62",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement63",{"className":"token","style":{"color":"#abe338"},"children":["\"User999\""]}],["$","span","code-segement64",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement66",{"className":"token","style":{"color":"#fefefe"},"children":["{"]}],["$","span","code-segement67",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement68",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement69",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["minLength"]}],["$","span","code-segement70",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement72",{"className":"token","style":{"color":"#00e0e0"},"children":["8"]}],["$","span","code-segement73",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement74",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement75",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement76",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["maxLength"]}],["$","span","code-segement77",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement79",{"className":"token","style":{"color":"#00e0e0"},"children":["20"]}],["$","span","code-segement80",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement81",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement83",{"className":"token literal-property","style":{"color":"#ffa07a"},"children":["errorMsg"]}],["$","span","code-segement84",{"className":"token","style":{"color":"#00e0e0"},"children":[":"]}],["$","span","code-segement85",{"className":"$undefined","style":{},"children":[" customErrorMsg"]}],["$","span","code-segement86",{"className":"token","style":{"color":"#fefefe"},"children":[","]}],["$","span","code-segement87",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement88",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement89",{"className":"token","style":{"color":"#fefefe"},"children":["}"]}],["$","span","code-segement90",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement91",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement92",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement93",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement94",{"className":"token console class-name","style":{},"children":["console"]}],["$","span","code-segement95",{"className":"token","style":{"color":"#fefefe"},"children":["."]}],["$","span","code-segement96",{"className":"token method property-access","style":{"color":"#ffd700"},"children":["log"]}],["$","span","code-segement97",{"className":"token","style":{"color":"#fefefe"},"children":["("]}],["$","span","code-segement98",{"className":"$undefined","style":{},"children":["result2"]}],["$","span","code-segement99",{"className":"token","style":{"color":"#fefefe"},"children":[")"]}],["$","span","code-segement100",{"className":"token","style":{"color":"#fefefe"},"children":[";"]}],["$","span","code-segement101",{"className":"$undefined","style":{},"children":["\n"]}],["$","span","code-segement102",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement103",{"className":"token","style":{"color":"#d4d0ab"},"children":["// Output: { isValid: false, errorMsg: 'Username too short' }"]}]]]}]}]]}]]}]],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children","validateUsername","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/fddaed6e25f52fb6.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children","functions","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children","js","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children","documentation","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","(doc-session)","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L5",null,{}],["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$6","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$7","children":"404"}],["$","div",null,{"style":"$8","children":["$","h2",null,{"style":"$9","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/7d13830f9f4d1100.css","precedence":"next","crossOrigin":"$undefined"}]]}],["$","$La",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$Lb"]]]] b:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Documentation"}],["$","meta","3",{"name":"description","content":"Documentation for the Multiform Validator library."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/index.html b/docs/page/index.html index 4bdd01c..d931179 100644 --- a/docs/page/index.html +++ b/docs/page/index.html @@ -1 +1 @@ -Multiform Validator

Multiform validator

Welcome to the multiform-validator website

Using my library, you can convert many lines of code into very few lines and as a result you have a cleaner, stronger and safer code, you will have several tools and functions that will do several form validations

Hello (:

npm versionLicense: MITnpm downloads

follow the documentation for more information

Go to github pageGo to npm page
npm install multiform-validator

or

yarn add multiform-validator

You can also help the programmer by buying a coffee at the link below, thanks in advance (:

Buy Me A Coffee
\ No newline at end of file +Multiform Validator

Multiform validator

Welcome to the multiform-validator website

Using my library, you can convert many lines of code into very few lines and as a result you have a cleaner, stronger and safer code, you will have several tools and functions that will do several form validations

Hello (:

npm versionLicense: MITnpm downloads

follow the documentation for more information

Go to github pageGo to npm page
npm install multiform-validator

or

yarn add multiform-validator

You can also help the programmer by buying a coffee at the link below, thanks in advance (:

Buy Me A Coffee
\ No newline at end of file diff --git a/docs/page/index.txt b/docs/page/index.txt index 982b5e4..ab61955 100644 --- a/docs/page/index.txt +++ b/docs/page/index.txt @@ -4,6 +4,6 @@ 5:I[9275,[],""] 6:I[1343,[],""] 7:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":[["$","h1",null,{"className":"mb-4 mt-10 text-center text-4xl font-semibold text-white","children":"Welcome to the multiform-validator website"}],["$","p",null,{"className":"text-center text-white","children":"Using my library, you can convert many lines of code into very few lines and as a result you have a cleaner, stronger and safer code, you will have several tools and functions that will do several form validations"}],["$","h2",null,{"className":"my-6 text-center text-4xl font-semibold text-white","children":"Hello (:"}],["$","div",null,{"className":"mb-6 mt-3 flex justify-center gap-2","children":[["$","$L2",null,{"href":"https://badge.fury.io/js/multiform-validator.svg","target":"_blank","children":["$","$L3",null,{"src":"https://badge.fury.io/js/multiform-validator.svg","alt":"npm version","width":0,"height":0,"className":"h-auto w-auto"}]}],["$","$L2",null,{"href":"https://opensource.org/licenses/MIT","target":"_blank","children":["$","$L3",null,{"src":"https://img.shields.io/badge/License-MIT-yellow.svg","alt":"License: MIT","width":0,"height":0,"className":"h-auto w-auto"}]}],["$","$L2",null,{"href":"https://npm-stat.com/charts.html?package=multiform-validator","target":"_blank","children":["$","$L3",null,{"src":"https://img.shields.io/npm/dm/multiform-validator.svg","alt":"npm downloads","width":0,"height":0,"className":"h-auto w-auto"}]}]]}],["$","p",null,{"className":" text-center text-white","children":["follow the"," ",["$","$L2",null,{"className":"text-blue-500","href":"/documentation","children":"documentation"}]," ","for more information"]}],["$","div",null,{"className":"mt-7 flex w-40 flex-col items-center justify-center gap-6 self-center","children":[["$","$L2",null,{"className":"text-blue-500","href":"https://github.com/gabriel-logan/multiform-validator","target":"_blank","rel":"noopener noreferrer","children":"Go to github page"}],["$","$L2",null,{"className":"text-blue-500","href":"https://www.npmjs.com/package/multiform-validator","target":"_blank","rel":"noopener noreferrer","children":"Go to npm page"}]]}],["$","div",null,{"className":"mx-auto my-4 w-5/6 md:w-96","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["npm"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["install"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","p",null,{"className":" text-center text-white","children":"or"}],["$","div",null,{"className":"mx-auto my-4 w-5/6 md:w-96","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["yarn"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["add"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","span",null,{"id":"temporary_span"}],["$","p",null,{"className":" mb-6 text-center text-white","children":"You can also help the programmer by buying a coffee at the link below, thanks in advance (:"}],["$","div",null,{"className":"mb-10 mt-5 h-16 w-52 self-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":["$","$L3",null,{"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee","width":208,"height":64,"className":"h-auto w-auto"}]}]}]]}]],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L7",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":[["$","h1",null,{"className":"mb-4 mt-10 text-center text-4xl font-semibold text-white","children":"Welcome to the multiform-validator website"}],["$","p",null,{"className":"text-center text-white","children":"Using my library, you can convert many lines of code into very few lines and as a result you have a cleaner, stronger and safer code, you will have several tools and functions that will do several form validations"}],["$","h2",null,{"className":"my-6 text-center text-4xl font-semibold text-white","children":"Hello (:"}],["$","div",null,{"className":"mb-6 mt-3 flex justify-center gap-2","children":[["$","$L2",null,{"href":"https://badge.fury.io/js/multiform-validator.svg","target":"_blank","children":["$","$L3",null,{"src":"https://badge.fury.io/js/multiform-validator.svg","alt":"npm version","width":0,"height":0,"className":"h-auto w-auto"}]}],["$","$L2",null,{"href":"https://opensource.org/licenses/MIT","target":"_blank","children":["$","$L3",null,{"src":"https://img.shields.io/badge/License-MIT-yellow.svg","alt":"License: MIT","width":0,"height":0,"className":"h-auto w-auto"}]}],["$","$L2",null,{"href":"https://npm-stat.com/charts.html?package=multiform-validator","target":"_blank","children":["$","$L3",null,{"src":"https://img.shields.io/npm/dm/multiform-validator.svg","alt":"npm downloads","width":0,"height":0,"className":"h-auto w-auto"}]}]]}],["$","p",null,{"className":" text-center text-white","children":["follow the"," ",["$","$L2",null,{"className":"text-blue-500","href":"/documentation","children":"documentation"}]," ","for more information"]}],["$","div",null,{"className":"mt-7 flex w-40 flex-col items-center justify-center gap-6 self-center","children":[["$","$L2",null,{"className":"text-blue-500","href":"https://github.com/gabriel-logan/multiform-validator","target":"_blank","rel":"noopener noreferrer","children":"Go to github page"}],["$","$L2",null,{"className":"text-blue-500","href":"https://www.npmjs.com/package/multiform-validator","target":"_blank","rel":"noopener noreferrer","children":"Go to npm page"}]]}],["$","div",null,{"className":"mx-auto my-4 w-5/6 md:w-96","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["npm"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["install"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","p",null,{"className":" text-center text-white","children":"or"}],["$","div",null,{"className":"mx-auto my-4 w-5/6 md:w-96","children":["$","pre",null,{"style":{"color":"#f8f8f2","background":"#2b2b2b","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"center","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none","padding":"1em","margin":"0.5em 0","overflow":"auto","borderRadius":"0.3em"},"children":["$","code",null,{"className":"language-bash","style":{"color":"#f8f8f2","background":"none","fontFamily":"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace","textAlign":"left","whiteSpace":"pre","wordSpacing":"normal","wordBreak":"normal","wordWrap":"normal","lineHeight":"1.5","MozTabSize":"4","OTabSize":"4","tabSize":"4","WebkitHyphens":"none","MozHyphens":"none","msHyphens":"none","hyphens":"none"},"children":[false,[["$","span","code-segement0",{"className":"token","style":{"color":"#ffd700"},"children":["yarn"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement2",{"className":"token","style":{"color":"#ffd700"},"children":["add"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" multiform-validator"]}]]]}]}]}],["$","span",null,{"id":"temporary_span"}],["$","p",null,{"className":" mb-6 text-center text-white","children":"You can also help the programmer by buying a coffee at the link below, thanks in advance (:"}],["$","div",null,{"className":"mb-10 mt-5 h-16 w-52 self-center","children":["$","$L2",null,{"href":"https://www.buymeacoffee.com/gabriellogan","target":"_blank","children":["$","$L3",null,{"src":"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png","alt":"Buy Me A Coffee","width":208,"height":64,"className":"h-auto w-auto"}]}]}]]}]],null],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L7",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L8"]]]] 8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Multiform Validator"}],["$","meta","3",{"name":"description","content":"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/info.html b/docs/page/info.html index 5499a53..10d40a4 100644 --- a/docs/page/info.html +++ b/docs/page/info.html @@ -1 +1 @@ -Multiform Validator

Multiform validator

multiform-validator - JavaScript Library for Form Field Validation

Introducing multiform-validator, a powerful JavaScript library developed by Gabriel Logan. This versatile library is designed to validate numerous form fields, including email addresses, phone numbers, passwords, CPF (Brazilian individual taxpayer registry numbers), credit card numbers, and more.

With multiform-validator, you can ensure that the data submitted through your forms is accurate and secure. Whether you're building a registration form, checkout process, or any data input system, this library has got you covered.

The multiform-validator library comes with an extensive set of pre-built validation rules and customizable options. You can easily integrate it into your web applications and enjoy the benefits of client-side validation, reducing the number of invalid form submissions and enhancing the overall user experience.

You can also use the multiform-validator to do validations in your backend, it works for any type of form validation or functions that use javascript, so feel free to use it

What sets multiform-validator apart is its flexibility and ease of use. You can effortlessly apply validation rules to different form fields by simply adding a few lines of JavaScript code. Additionally, the library provides informative error messages, guiding users on how to correct their inputs, thereby reducing frustration and form abandonment rates.

Gabriel Logan takes pride in developing the multiform-validator library with a focus on performance, efficiency, and reliability. The library is optimized for various browsers, ensuring seamless compatibility for your diverse audience.

So, if you're seeking a comprehensive solution for form field validation, look no further than multiform-validator. Embrace the power of this library, and rest assured that your data collection process will be streamlined, accurate, and secure.

\ No newline at end of file +Multiform Validator

Multiform validator

multiform-validator - JavaScript Library for Form Field Validation

Introducing multiform-validator, a powerful JavaScript library developed by Gabriel Logan. This versatile library is designed to validate numerous form fields, including email addresses, phone numbers, passwords, CPF (Brazilian individual taxpayer registry numbers), credit card numbers, and more.

With multiform-validator, you can ensure that the data submitted through your forms is accurate and secure. Whether you're building a registration form, checkout process, or any data input system, this library has got you covered.

The multiform-validator library comes with an extensive set of pre-built validation rules and customizable options. You can easily integrate it into your web applications and enjoy the benefits of client-side validation, reducing the number of invalid form submissions and enhancing the overall user experience.

You can also use the multiform-validator to do validations in your backend, it works for any type of form validation or functions that use javascript, so feel free to use it

What sets multiform-validator apart is its flexibility and ease of use. You can effortlessly apply validation rules to different form fields by simply adding a few lines of JavaScript code. Additionally, the library provides informative error messages, guiding users on how to correct their inputs, thereby reducing frustration and form abandonment rates.

Gabriel Logan takes pride in developing the multiform-validator library with a focus on performance, efficiency, and reliability. The library is optimized for various browsers, ensuring seamless compatibility for your diverse audience.

So, if you're seeking a comprehensive solution for form field validation, look no further than multiform-validator. Embrace the power of this library, and rest assured that your data collection process will be streamlined, accurate, and secure.

\ No newline at end of file diff --git a/docs/page/info.txt b/docs/page/info.txt index 06555a2..054cda5 100644 --- a/docs/page/info.txt +++ b/docs/page/info.txt @@ -2,6 +2,6 @@ 3:I[1343,[],""] 4:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] 5:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["info",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["info",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"multiform-validator - JavaScript Library for Form Field Validation"}],["$","p",null,{"children":"Introducing multiform-validator, a powerful JavaScript library developed by Gabriel Logan. This versatile library is designed to validate numerous form fields, including email addresses, phone numbers, passwords, CPF (Brazilian individual taxpayer registry numbers), credit card numbers, and more."}],["$","p",null,{"children":"With multiform-validator, you can ensure that the data submitted through your forms is accurate and secure. Whether you're building a registration form, checkout process, or any data input system, this library has got you covered."}],["$","p",null,{"children":"The multiform-validator library comes with an extensive set of pre-built validation rules and customizable options. You can easily integrate it into your web applications and enjoy the benefits of client-side validation, reducing the number of invalid form submissions and enhancing the overall user experience."}],["$","p",null,{"children":"You can also use the multiform-validator to do validations in your backend, it works for any type of form validation or functions that use javascript, so feel free to use it"}],["$","p",null,{"children":"What sets multiform-validator apart is its flexibility and ease of use. You can effortlessly apply validation rules to different form fields by simply adding a few lines of JavaScript code. Additionally, the library provides informative error messages, guiding users on how to correct their inputs, thereby reducing frustration and form abandonment rates."}],["$","p",null,{"children":"Gabriel Logan takes pride in developing the multiform-validator library with a focus on performance, efficiency, and reliability. The library is optimized for various browsers, ensuring seamless compatibility for your diverse audience."}],["$","p",null,{"className":"last-p","children":"So, if you're seeking a comprehensive solution for form field validation, look no further than multiform-validator. Embrace the power of this library, and rest assured that your data collection process will be streamlined, accurate, and secure."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","info","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["info",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["info",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"multiform-validator - JavaScript Library for Form Field Validation"}],["$","p",null,{"children":"Introducing multiform-validator, a powerful JavaScript library developed by Gabriel Logan. This versatile library is designed to validate numerous form fields, including email addresses, phone numbers, passwords, CPF (Brazilian individual taxpayer registry numbers), credit card numbers, and more."}],["$","p",null,{"children":"With multiform-validator, you can ensure that the data submitted through your forms is accurate and secure. Whether you're building a registration form, checkout process, or any data input system, this library has got you covered."}],["$","p",null,{"children":"The multiform-validator library comes with an extensive set of pre-built validation rules and customizable options. You can easily integrate it into your web applications and enjoy the benefits of client-side validation, reducing the number of invalid form submissions and enhancing the overall user experience."}],["$","p",null,{"children":"You can also use the multiform-validator to do validations in your backend, it works for any type of form validation or functions that use javascript, so feel free to use it"}],["$","p",null,{"children":"What sets multiform-validator apart is its flexibility and ease of use. You can effortlessly apply validation rules to different form fields by simply adding a few lines of JavaScript code. Additionally, the library provides informative error messages, guiding users on how to correct their inputs, thereby reducing frustration and form abandonment rates."}],["$","p",null,{"children":"Gabriel Logan takes pride in developing the multiform-validator library with a focus on performance, efficiency, and reliability. The library is optimized for various browsers, ensuring seamless compatibility for your diverse audience."}],["$","p",null,{"className":"last-p","children":"So, if you're seeking a comprehensive solution for form field validation, look no further than multiform-validator. Embrace the power of this library, and rest assured that your data collection process will be streamlined, accurate, and secure."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","info","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Multiform Validator"}],["$","meta","3",{"name":"description","content":"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/privacity-polices.html b/docs/page/privacity-polices.html index c7c498f..2330f27 100644 --- a/docs/page/privacity-polices.html +++ b/docs/page/privacity-polices.html @@ -1 +1 @@ -Multiform Validator

Multiform validator

Privacy Policies - Your Data is Safe with Us

At Gabriel Logan Web Services, we take your privacy seriously. We want to assure you that we do not collect any data on our website, and we do not use any data through the "multiform-validator" library. Your information remains entirely confidential, and your privacy is paramount to us.

When you visit our website, rest assured that no personal data, such as your name, email address, or contact information, is gathered or stored. We believe in providing you with a safe and anonymous browsing experience.

The "multiform-validator" library is designed to validate form fields on your web applications without accessing or transmitting any data to external servers. All validation occurs locally within your browser, ensuring that your sensitive information never leaves your device.

We understand the importance of data security, and that's why we have meticulously developed the "multiform-validator" library to be 100% secure. Your data remains under your control, and we do not have access to any information processed by the library.

Your trust is valuable to us, and we want you to feel confident in using our services and the "multiform-validator" library. Our commitment to your privacy is unwavering, and we will continue to prioritize the security and protection of your data in all aspects of our work.

If you have any questions or concerns about our privacy policies or the use of the "multiform-validator" library, please don't hesitate to contact us. We are here to address any inquiries and ensure your peace of mind.

Thank you for choosing Gabriel Logan Web Services. We look forward to providing you with exceptional solutions while safeguarding your privacy every step of the way.

\ No newline at end of file +Multiform Validator

Multiform validator

Privacy Policies - Your Data is Safe with Us

At Gabriel Logan Web Services, we take your privacy seriously. We want to assure you that we do not collect any data on our website, and we do not use any data through the "multiform-validator" library. Your information remains entirely confidential, and your privacy is paramount to us.

When you visit our website, rest assured that no personal data, such as your name, email address, or contact information, is gathered or stored. We believe in providing you with a safe and anonymous browsing experience.

The "multiform-validator" library is designed to validate form fields on your web applications without accessing or transmitting any data to external servers. All validation occurs locally within your browser, ensuring that your sensitive information never leaves your device.

We understand the importance of data security, and that's why we have meticulously developed the "multiform-validator" library to be 100% secure. Your data remains under your control, and we do not have access to any information processed by the library.

Your trust is valuable to us, and we want you to feel confident in using our services and the "multiform-validator" library. Our commitment to your privacy is unwavering, and we will continue to prioritize the security and protection of your data in all aspects of our work.

If you have any questions or concerns about our privacy policies or the use of the "multiform-validator" library, please don't hesitate to contact us. We are here to address any inquiries and ensure your peace of mind.

Thank you for choosing Gabriel Logan Web Services. We look forward to providing you with exceptional solutions while safeguarding your privacy every step of the way.

\ No newline at end of file diff --git a/docs/page/privacity-polices.txt b/docs/page/privacity-polices.txt index 239c206..36b2dbc 100644 --- a/docs/page/privacity-polices.txt +++ b/docs/page/privacity-polices.txt @@ -2,6 +2,6 @@ 3:I[1343,[],""] 4:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] 5:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["privacity-polices",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["privacity-polices",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Privacy Policies - Your Data is Safe with Us"}],["$","p",null,{"children":"At Gabriel Logan Web Services, we take your privacy seriously. We want to assure you that we do not collect any data on our website, and we do not use any data through the \"multiform-validator\" library. Your information remains entirely confidential, and your privacy is paramount to us."}],["$","p",null,{"children":"When you visit our website, rest assured that no personal data, such as your name, email address, or contact information, is gathered or stored. We believe in providing you with a safe and anonymous browsing experience."}],["$","p",null,{"children":"The \"multiform-validator\" library is designed to validate form fields on your web applications without accessing or transmitting any data to external servers. All validation occurs locally within your browser, ensuring that your sensitive information never leaves your device."}],["$","p",null,{"children":"We understand the importance of data security, and that's why we have meticulously developed the \"multiform-validator\" library to be 100% secure. Your data remains under your control, and we do not have access to any information processed by the library."}],["$","p",null,{"children":"Your trust is valuable to us, and we want you to feel confident in using our services and the \"multiform-validator\" library. Our commitment to your privacy is unwavering, and we will continue to prioritize the security and protection of your data in all aspects of our work."}],["$","p",null,{"children":"If you have any questions or concerns about our privacy policies or the use of the \"multiform-validator\" library, please don't hesitate to contact us. We are here to address any inquiries and ensure your peace of mind."}],["$","p",null,{"className":"last-p","children":"Thank you for choosing Gabriel Logan Web Services. We look forward to providing you with exceptional solutions while safeguarding your privacy every step of the way."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","privacity-polices","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["privacity-polices",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["privacity-polices",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Privacy Policies - Your Data is Safe with Us"}],["$","p",null,{"children":"At Gabriel Logan Web Services, we take your privacy seriously. We want to assure you that we do not collect any data on our website, and we do not use any data through the \"multiform-validator\" library. Your information remains entirely confidential, and your privacy is paramount to us."}],["$","p",null,{"children":"When you visit our website, rest assured that no personal data, such as your name, email address, or contact information, is gathered or stored. We believe in providing you with a safe and anonymous browsing experience."}],["$","p",null,{"children":"The \"multiform-validator\" library is designed to validate form fields on your web applications without accessing or transmitting any data to external servers. All validation occurs locally within your browser, ensuring that your sensitive information never leaves your device."}],["$","p",null,{"children":"We understand the importance of data security, and that's why we have meticulously developed the \"multiform-validator\" library to be 100% secure. Your data remains under your control, and we do not have access to any information processed by the library."}],["$","p",null,{"children":"Your trust is valuable to us, and we want you to feel confident in using our services and the \"multiform-validator\" library. Our commitment to your privacy is unwavering, and we will continue to prioritize the security and protection of your data in all aspects of our work."}],["$","p",null,{"children":"If you have any questions or concerns about our privacy policies or the use of the \"multiform-validator\" library, please don't hesitate to contact us. We are here to address any inquiries and ensure your peace of mind."}],["$","p",null,{"className":"last-p","children":"Thank you for choosing Gabriel Logan Web Services. We look forward to providing you with exceptional solutions while safeguarding your privacy every step of the way."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","privacity-polices","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Multiform Validator"}],["$","meta","3",{"name":"description","content":"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/page/terms.html b/docs/page/terms.html index 0fccff3..b3ff32d 100644 --- a/docs/page/terms.html +++ b/docs/page/terms.html @@ -1 +1 @@ -Multiform Validator

Multiform validator

Terms and Conditions

Welcome to Gabriel Logan Web Services. By using this website, you agree to the following terms and conditions:

- The content provided on this website is for general information purposes only, and we make no warranties or representations regarding its accuracy or completeness.

- We use the "multiform-validator" library, licensed under the MIT License, to enhance form field validation. However, we are not responsible for its usage or any consequences resulting from third-party use of the library.

- We do not collect any personal data through this website, and your privacy is important to us.

- Unauthorized use of this website is strictly prohibited.

- Your use of this website and any disputes arising are subject to the laws of [Your Country/Region].

Thank you for visiting our website and using our services. If you have any questions or concerns, please don't hesitate to contact us.

\ No newline at end of file +Multiform Validator

Multiform validator

Terms and Conditions

Welcome to Gabriel Logan Web Services. By using this website, you agree to the following terms and conditions:

- The content provided on this website is for general information purposes only, and we make no warranties or representations regarding its accuracy or completeness.

- We use the "multiform-validator" library, licensed under the MIT License, to enhance form field validation. However, we are not responsible for its usage or any consequences resulting from third-party use of the library.

- We do not collect any personal data through this website, and your privacy is important to us.

- Unauthorized use of this website is strictly prohibited.

- Your use of this website and any disputes arising are subject to the laws of [Your Country/Region].

Thank you for visiting our website and using our services. If you have any questions or concerns, please don't hesitate to contact us.

\ No newline at end of file diff --git a/docs/page/terms.txt b/docs/page/terms.txt index b2aaa56..b450f6e 100644 --- a/docs/page/terms.txt +++ b/docs/page/terms.txt @@ -2,6 +2,6 @@ 3:I[1343,[],""] 4:I[8234,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] 5:I[7546,["7259","static/chunks/479ba886-6a42afe2a0b339bc.js","7699","static/chunks/8e1d74a4-c1a695c4dcc947fe.js","231","static/chunks/231-bff31d3970707cb0.js","3185","static/chunks/app/layout-f137a1d523ed5aa9.js"],"default"] -0:["hQ2Ln4qODzW9xlWqU5b-m",[[["",{"children":["terms",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["terms",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Terms and Conditions"}],["$","p",null,{"children":"Welcome to Gabriel Logan Web Services. By using this website, you agree to the following terms and conditions:"}],["$","p",null,{"children":"- The content provided on this website is for general information purposes only, and we make no warranties or representations regarding its accuracy or completeness."}],["$","p",null,{"children":"- We use the \"multiform-validator\" library, licensed under the MIT License, to enhance form field validation. However, we are not responsible for its usage or any consequences resulting from third-party use of the library."}],["$","p",null,{"children":"- We do not collect any personal data through this website, and your privacy is important to us."}],["$","p",null,{"children":"- Unauthorized use of this website is strictly prohibited."}],["$","p",null,{"children":"- Your use of this website and any disputes arising are subject to the laws of [Your Country/Region]."}],["$","p",null,{"className":"last-p","children":"Thank you for visiting our website and using our services. If you have any questions or concerns, please don't hesitate to contact us."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","terms","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] +0:["Mm8wtyweDSqm_zxtXicLh",[[["",{"children":["terms",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["terms",{"children":["__PAGE__",{},[["$L1",["$","main",null,{"className":"flex min-h-screen flex-col overflow-x-hidden bg-bg1-dark bg-bg1 bg-repeat p-4 transition-all ease-linear","style":{"backgroundSize":"7%"},"children":["$","section",null,{"children":[["$","h1",null,{"children":"Terms and Conditions"}],["$","p",null,{"children":"Welcome to Gabriel Logan Web Services. By using this website, you agree to the following terms and conditions:"}],["$","p",null,{"children":"- The content provided on this website is for general information purposes only, and we make no warranties or representations regarding its accuracy or completeness."}],["$","p",null,{"children":"- We use the \"multiform-validator\" library, licensed under the MIT License, to enhance form field validation. However, we are not responsible for its usage or any consequences resulting from third-party use of the library."}],["$","p",null,{"children":"- We do not collect any personal data through this website, and your privacy is important to us."}],["$","p",null,{"children":"- Unauthorized use of this website is strictly prohibited."}],["$","p",null,{"children":"- Your use of this website and any disputes arising are subject to the laws of [Your Country/Region]."}],["$","p",null,{"className":"last-p","children":"Thank you for visiting our website and using our services. If you have any questions or concerns, please don't hesitate to contact us."}]]}]}]],null],null]},["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","terms","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/f4500b1777bf3c0e.css","precedence":"next","crossOrigin":"$undefined"}]]}],null]},[["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_05d3b5","children":[["$","$L4",null,{}],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","$L5",null,{}],["$","script",null,{"data-name":"BMC-Widget","data-cfasync":"false","src":"https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js","data-id":"gabriellogan","data-description":"Support me on Buy me a coffee!","data-message":"","data-color":"#5F7FFF","data-position":"Right","data-x_margin":"18","data-y_margin":"18","defer":true}]]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/multiform-validator/_next/static/css/aed8f888050d7c13.css","precedence":"next","crossOrigin":"$undefined"}]],"$L6"]]]] 6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Multiform Validator"}],["$","meta","3",{"name":"description","content":"Multilingual library made for validation, various form fields, such as: email, telephone, password, cpf, cnpj, credit card, magic numbers for image mimetype validation and much more."}],["$","link","4",{"rel":"author","href":"https://github.com/gabriel-logan"}],["$","meta","5",{"name":"author","content":"Gabriel Logan"}],["$","meta","6",{"name":"generator","content":"Gabriel Logan"}],["$","meta","7",{"name":"keywords","content":"validation,form,fields,email,telephone,password,cpf,cnpj,credit card,magic numbers,image,mimetype,validator,multiform,validação,email-validator,multiform-validator,javascript,npm,security,safe,pentest,security-tools,Validator,validate"}],["$","meta","8",{"name":"classification","content":"Validation Library"}],["$","link","9",{"rel":"icon","href":"/multiform-validator/favicon.ico","type":"image/x-icon","sizes":"256x256"}]] 1:null diff --git a/docs/src/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page.tsx index 46be729..b5e769b 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/passwordStrengthTester/page.tsx @@ -55,20 +55,23 @@ export default function PasswordStrengthTester() {

Examples

-
-					
-						const result1 = passwordStrengthTester('12345'); //
-						Output: 'veryWeak' console.log(result1); const result2 =
-						passwordStrengthTester('abcdef'); // Output:
-						'weak' console.log(result2); const result3 =
-						passwordStrengthTester('abc12345'); // Output:
-						'regular' console.log(result3); const result4 =
-						passwordStrengthTester('Abc123awdasd'); // Output:
-						'strong' console.log(result4); const result5 =
-						passwordStrengthTester('SuperSecurePassword123!@'); //
-						Output: 'veryStrong' console.log(result5);
-					
-				
+ + + {`const result1 = passwordStrengthTester("12345"); +console.log(result1); // Output: veryWeak + +const result2 = passwordStrengthTester("abcdef"); +console.log(result2); // Output: weak + +const result3 = passwordStrengthTester("abc12345"); +console.log(result3); // Output: regular + +const result4 = passwordStrengthTester("Abc123awdasd"); +console.log(result4); // Output: strong + +const result5 = passwordStrengthTester("SuperSecurePassword123!@"); +console.log(result5); // Output: veryStrong`} +

Notes

diff --git a/docs/src/app/(doc-session)/documentation/js/functions/validatePassword/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/validatePassword/page.tsx index a052d57..67292e7 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/validatePassword/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/validatePassword/page.tsx @@ -128,14 +128,14 @@ function validatePassword(

Default Error Messages

{`[ - 'This password is too long', - 'Password too short', - 'Requires at least one capital letter', - 'Requires at least one special character', - 'Requires at least one number', - 'Requires at least one letter', - 'Unknown error', - ]`} + 'This password is too long', + 'Password too short', + 'Requires at least one capital letter', + 'Requires at least one special character', + 'Requires at least one number', + 'Requires at least one letter', + 'Unknown error', +]`}

Examples

@@ -205,7 +205,10 @@ const result5 = validatePassword("WeakPassword1", { console.log(result5); // Output: { isValid: false, errorMsg: 'Requires at least one special character' } -// Example 6: Valid password with custom error message for special character requirement +/* +Example 6: Valid password with custom error message +for special character requirement +*/ const myCustomErrorMsg2 = [...defaultErrorMsg]; myCustomErrorMsg2[3] = "Custom error: Requires at least one special character"; const result6 = validatePassword("MyP@ssw0rd", {