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 b5e769b..85ecffc 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 @@ -4,8 +4,12 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function PasswordStrengthTester() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
@@ -13,20 +17,20 @@ export default function PasswordStrengthTester() {

- Password Strength Tester Function Documentation + Password Strength Tester {t("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. + {t("The")} passwordStrengthTester{" "} + {t( + '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

+

{t("Import")}

- The function can be imported using ES6 syntax from the - "password-strength-tester" package: + {t( + 'The function can be imported using ES6 syntax from the "password-strength-tester" package:', + )}

@@ -34,7 +38,9 @@ export default function PasswordStrengthTester() {

- Alternatively, you can import the function using CommonJS syntax with{" "} + {t( + "Alternatively, you can import the function using CommonJS syntax with", + )}{" "} require (Node.js):

@@ -42,19 +48,20 @@ export default function PasswordStrengthTester() { {`const { passwordStrengthTester } = require('multiform-validator');`} -

Parameters

+

{t("Parameters")}

- The function takes one parameter, which must be a string representing - the password to be evaluated. + {t( + "The function takes one parameter, which must be a string representing the password to be evaluated.", + )}

-

Examples

+

{t("Examples")}

{`const result1 = passwordStrengthTester("12345"); @@ -73,48 +80,55 @@ const result5 = passwordStrengthTester("SuperSecurePassword123!@"); console.log(result5); // Output: veryStrong`} -

Notes

+

{t("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: + {t( + "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:", + )}

diff --git a/docs/src/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page.tsx index 6547393..ecdd30e 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/validateBRPhoneNumber/page.tsx @@ -4,8 +4,12 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function ValidateBRPhoneNumber() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
@@ -13,21 +17,20 @@ export default function ValidateBRPhoneNumber() {

- BR Phone Number Validation Function Documentation + BR Phone Number Validation {t("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. + {t("The")} validateBRPhoneNumber{" "} + {t( + '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: + {t( + 'The function can be imported using ES6 syntax from the "br-phone-number-validator" package:', + )}

@@ -35,7 +38,9 @@ export default function ValidateBRPhoneNumber() {

- Alternatively, you can import the function using CommonJS syntax with{" "} + {t( + "Alternatively, you can import the function using CommonJS syntax with", + )}{" "} require (Node.js):

@@ -43,22 +48,23 @@ export default function ValidateBRPhoneNumber() { {`const { validateBRPhoneNumber } = require('multiform-validator');`} -

Parameters

-

The function takes two parameters:

+

{t("Parameters")}

+

{t("The function takes two parameters:")}

  • - phoneNumber (string) - The Brazilian phone number to be - validated. + phoneNumber (string) -{" "} + {t("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. + errorMsg (string[]){" "} + {t( + "[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:

+

{t("Default Error Messages")}

+

{t("The default error messages are as follows:")}

{`[ @@ -68,7 +74,7 @@ export default function ValidateBRPhoneNumber() { ]`} -

Examples

+

{t("Examples")}

{`const result1 = validateBRPhoneNumber('(11) 98765-4321'); diff --git a/docs/src/app/(doc-session)/documentation/js/functions/validateEmail/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/validateEmail/page.tsx index a9fd25b..e20d5c1 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/validateEmail/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/validateEmail/page.tsx @@ -4,52 +4,62 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function ValidateEmail() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
-

Email Validation Function Documentation

+

+ Email Validation {t("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. + {t("The")} validateEmail{" "} + {t( + '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 + {t("What is the difference between")} validateEmail{" "} + {t("and")} isEmail?{" "} + {t( + "isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there,", + )}{" "} + validateEmail{" "} + {t( + "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: + {t( + 'The function can be imported using ES6 syntax from the "multiform-validator" package:', + )}

- {`import { validateEmail } from 'multiform-validator';`} + {`import { validateEmail } from "multiform-validator";`}

- Alternatively, you can import the function using CommonJS syntax with{" "} + {t( + "Alternatively, you can import the function using CommonJS syntax with", + )}{" "} require (Node.js):

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

Function Signature

+

{t("Function Signature")}

{`interface OptionsParams { maxLength?: number; @@ -76,38 +86,47 @@ function validateEmail( ): { isValid: boolean, errorMsg: string | null };`} -

Parameters

+

{t("Parameters")}

  • - email (string) - The email address to be validated. + email (string) -{" "} + {t("The email address to be validated.")}
  • - maxLength (number) [optional] - The maximum length - allowed for the email address. If not provided, the default value is - 400. + maxLength (number){" "} + {t( + "[optional] - The maximum length allowed for the email address. If not provided, the default value is 400.", + )}
  • - country (string) [optional] - The country code to check - if the email ends with it. If not provided, no country code check - will be performed. + country (string){" "} + {t( + "[optional] - The country code to check if the email ends with it. If not provided, no country code check will be performed.", + )}
  • - errorMsg (string[]) [optional] - An array of error - messages to customize the response. If not provided, the function - will use default error messages. + errorMsg (string[]){" "} + {t( + "[optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.", + )}
  • - validDomains (boolean | string[]) [optional] - This - parameter determines whether to check for specific valid email - domains or not. If set to true, the function will use a - default list of valid domains. If set to 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. + validDomains (boolean | string[]){" "} + {t( + "[optional] - This parameter determines whether to check for specific valid email domains or not. If set to", + )}{" "} + true,{" "} + {t( + "the function will use a default list of valid domains. If set to", + )}{" "} + false,{" "} + {t( + "no domain check will be performed. Alternatively, you can pass an array of custom valid domains to perform the check against a specific list.", + )}
-

Default list of valid domains

+

{t("Default list of valid domains")}

{`[ '@gmail.com', @@ -124,7 +143,7 @@ function validateEmail( ];`} -

Default Error Messages

+

{t("Default Error Messages")}

{`[ 'Invalid value passed', @@ -136,7 +155,7 @@ function validateEmail( ]`} -

Examples

+

{t("Examples")}

{`const result1: ValidateFunctions = validateEmail("foor@bar.com", { maxLength: 30, diff --git a/docs/src/app/(doc-session)/documentation/js/functions/validateName/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/validateName/page.tsx index 1148671..edb9a33 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/validateName/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/validateName/page.tsx @@ -4,24 +4,27 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function ValidateName() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
-

Name Validation Function Documentation

+

Name Validation {t("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. + {t("The")} validateName{" "} + {t( + "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

+

{t("Function Signature")}

{`function validateName( name: string, @@ -33,27 +36,32 @@ export default function ValidateName() { ): { isValid: boolean, errorMsg: string | null };`} -

Parameters

+

{t("Parameters")}

  • - name (string) - The name to be validated. + name (string) - {t("The name to be validated.")}
  • - minLength (number) [optional] - The minimum length - allowed for the name. Default value: 1. + minLength (number) -{" "} + {t( + "[optional] The minimum length allowed for the name. Default value: 1.", + )}
  • - maxLength (number) [optional] - The maximum length - allowed for the name. Default value: 20. + maxLength (number) -{" "} + {t( + "[optional] The maximum length allowed for the name. Default value: 20.", + )}
  • - errorMsg (string[]) [optional] - An array of error - messages to customize the response. If not provided, the function - will use default error messages. + errorMsg (string[]) -{" "} + {t( + "[optional] An array of error messages to customize the response. If not provided, the function will use default error messages.", + )}
-

Default Error Messages

+

{t("Default Error Messages")}

{`[ @@ -66,7 +74,7 @@ export default function ValidateName() { ]`} -

Examples

+

{t("Examples")}

{`const result1 = validateName("John", { diff --git a/docs/src/app/(doc-session)/documentation/js/functions/validatePassportNumber/page.tsx b/docs/src/app/(doc-session)/documentation/js/functions/validatePassportNumber/page.tsx index 34c8966..85c045e 100644 --- a/docs/src/app/(doc-session)/documentation/js/functions/validatePassportNumber/page.tsx +++ b/docs/src/app/(doc-session)/documentation/js/functions/validatePassportNumber/page.tsx @@ -4,8 +4,12 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function ValidatePassportNumber() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
@@ -13,21 +17,16 @@ export default function ValidatePassportNumber() {

- Passport Number Validation Function Documentation + Passport Number Validation {t("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. + {t("The")} validatePassportNumber{" "} + {t( + "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

+

{t("Function Signature")}

{`function validatePassportNumber( @@ -35,15 +34,15 @@ export default function ValidatePassportNumber() { ): { isValid: boolean, country: string | null };`} -

Parameters

+

{t("Parameters")}

  • - passportNumber (string) - The passport number to be - validated. + passportNumber (string) -{" "} + {t("The passport number to be validated.")}
-

Examples

+

{t("Examples")}

{`const result1 = validatePassportNumber('A1234567'); @@ -55,41 +54,49 @@ console.log(result2); // Output: { isValid: false, country: null }`} -

Supported Passport Formats

+

{t("Supported Passport Formats")}

    -
  • United States: 9 digits (e.g., '123456789')
  • +
  • {t("United States: 9 digits (e.g., '123456789')")}
  • - United Kingdom: 2 uppercase letters followed by 6 digits (e.g., - 'AB123456') + {t( + "United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')", + )}
  • - Germany: 2 uppercase letters followed by 8 digits (e.g., - 'AB12345678') + {t( + "Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')", + )}
  • - Canada: 1 uppercase letter followed by 7 digits (e.g., - 'A1234567') + {t( + "Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + )}
  • - Australia: 1 uppercase letter followed by 7 digits (e.g., - 'A1234567') + {t( + "Australia: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + )}
  • -
  • Brazil: 9 digits (e.g., '123456789')
  • +
  • {t("Brazil: 9 digits (e.g., '123456789')")}
  • - France: 2 uppercase letters followed by 7 digits (e.g., - 'AB1234567') + {t( + "France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')", + )}
  • - Italy: 1 uppercase letter followed by 7 digits (e.g., - 'A1234567') + {t( + "Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + )}
  • - India: 1 uppercase letter followed by 7 digits (e.g., - 'A1234567') + {t( + "India: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + )}
  • - China: 1 uppercase letter followed by 8 digits (e.g., - 'A12345678') + {t( + "China: 1 uppercase letter followed by 8 digits (e.g., 'A12345678')", + )}
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 67292e7..e79165b 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 @@ -4,36 +4,42 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism"; import DrawerComponent from "@/components/Drawer"; +import translation from "@/components/Internationalization"; export default function ValidatePassword() { + const t = (text: string) => + translation({ text, subject: "DocumentationJsFunctions" }); + return (
-

Password Validation Function Documentation

+

+ Password Validation {t("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. + {t("The")} validatePassword{" "} + {t( + '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: + {t( + '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{" "} + {t( + "Alternatively, you can import the function using CommonJS syntax with", + )}{" "} require (Node.js):

@@ -41,7 +47,7 @@ export default function ValidatePassword() { {`const { validatePassword } = require('multiform-validator');`} -

Function Signature

+

{t("Function Signature")}

{`interface Options { requireUppercase?: boolean; @@ -80,52 +86,68 @@ function validatePassword( ): { isValid: boolean, errorMsg: string | null };`} -

Parameters

+

{t("Parameters")}

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

Default Error Messages

+

{t("Default Error Messages")}

{`[ 'This password is too long', @@ -138,7 +160,7 @@ function validatePassword( ]`} -

Examples

+

{t("Examples")}

{`const defaultErrorMsg = [...]; diff --git a/docs/src/locales/en/en.json b/docs/src/locales/en/en.json index 5bb19dd..623f0bb 100644 --- a/docs/src/locales/en/en.json +++ b/docs/src/locales/en/en.json @@ -281,12 +281,7 @@ "How to use the isValidImage function": "How to use the isValidImage function", "function is used to check whether an image file is valid or not. It accepts a Buffer as an argument.": "function is used to check whether an image file is valid or not. It accepts a Buffer as an argument.", - "jpeg": "jpeg", - "png": "png", - "gif": "gif", - "ico": "ico", "Passing options to the": "Passing options to the", - "isValidImage": "isValidImage", "Example Usage with Nestjs and Multer": "Example Usage with Nestjs and Multer", "In this example it only allocates 4 bytes for performance reasons, but you can pass the entire file.": "In this example it only allocates 4 bytes for performance reasons, but you can pass the entire file.", "First, import the": "First, import the", @@ -302,6 +297,73 @@ "function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument.": "function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument.", "How to use the isValidVideo function": "How to use the isValidVideo function", - "function is used to check whether an video file is valid or not. It accepts a Buffer as an argument.": "function is used to check whether an video file is valid or not. It accepts a Buffer as an argument." + "function is used to check whether an video file is valid or not. It accepts a Buffer as an argument.": "function is used to check whether an video file is valid or not. It accepts a Buffer as an argument.", + + "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.": "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.", + "The function can be imported using ES6 syntax from the \"password-strength-tester\" package:": "The function can be imported using ES6 syntax from the \"password-strength-tester\" package:", + "The function takes one parameter, which must be a string representing the password to be evaluated.": "The function takes one parameter, which must be a string representing the password to be evaluated.", + "The password to be evaluated for strength.": "The password to be evaluated for strength.", + "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:": "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:", + "'veryWeak' - Password with less than 6 characters, consisting only of numbers": "'veryWeak' - Password with less than 6 characters, consisting only of numbers", + "'weak' - Password with less than 6 characters, consisting of numbers and letters": "'weak' - Password with less than 6 characters, consisting of numbers and letters", + "'weak' - Password that repeats the same character more than 3 times in a row and is less than 10 characters long": "'weak' - Password that repeats the same character more than 3 times in a row and is less than 10 characters long", + "'weak' - Password between 5 and 8 characters, consisting only of numbers": "'weak' - Password between 5 and 8 characters, consisting only of numbers", + "'regular' - Password between 9 and 12 characters": "'regular' - Password between 9 and 12 characters", + "'regular' - Password greater than or equal to 6 and less than 8 characters, containing at least one number and one letter": "'regular' - Password greater than or equal to 6 and less than 8 characters, containing at least one number and one letter", + "'regular' - Password greater than 10 and has characters that are repeated more than 5 times in sequence": "'regular' - Password greater than 10 and has characters that are repeated more than 5 times in sequence", + "'strong' - Password between 13 and 16 characters": "'strong' - Password between 13 and 16 characters", + "'strong' - Password with 8 or more characters, containing at least one uppercase letter, one number and one lowercase letter": "'strong' - Password with 8 or more characters, containing at least one uppercase letter, one number and one lowercase letter", + "'veryStrong' - Password longer than 16 characters": "'veryStrong' - Password longer than 16 characters", + "'veryStrong' - Password with 8 or more characters, containing at least one uppercase letter, one number, one special character and one lowercase letter": "'veryStrong' - Password with 8 or more characters, containing at least one uppercase letter, one number, one special character and one lowercase letter", + + "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.": "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.", + "The Brazilian phone number to be validated.": "The Brazilian phone number to be validated.", + "[optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.": "[optional] - An array of error messages to customize the response. If not provided, the function will use default error messages.", + "Default Error Messages": "Default Error Messages", + "The default error messages are as follows:": "The default error messages are as follows:", + + "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.": "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": "What is the difference between", + "isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there,": "isEmail just does simple validations like checking if the string has the formatting of an email like several validators out there,", + "does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters.": "does not, it does complex validations and better than that, you can customize the validations passing the information in the parameters.", + "Function Signature": "Function Signature", + "The email address to be validated.": "The email address to be validated.", + "[optional] - The maximum length allowed for the email address. If not provided, the default value is 400.": "[optional] - The maximum length allowed for the email address. If not provided, the default value is 400.", + "[optional] - The country code to check if the email ends with it. If not provided, no country code check will be performed.": "[optional] - The country code to check if the email ends with it. If not provided, no country code check will be performed.", + "[optional] - This parameter determines whether to check for specific valid email domains or not. If set to": "[optional] - This parameter determines whether to check for specific valid email domains or not. If set to", + "the function will use a default list of valid domains. If set to": "the function will use a default list of valid domains. If set to", + "no domain check will be performed. Alternatively, you can pass an array of custom valid domains to perform the check against a specific list.": "no domain check will be performed. Alternatively, you can pass an array of custom valid domains to perform the check against a specific list.", + "Default list of valid domains": "Default list of valid domains", + + "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 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.", + "The name to be validated.": "The name to be validated.", + "[optional] The minimum length allowed for the name. Default value: 1.": "[optional] The minimum length allowed for the name. Default value: 1.", + "[optional] The maximum length allowed for the name. Default value: 20.": "[optional] The maximum length allowed for the name. Default value: 20.", + + "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 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.", + "The passport number to be validated.": "The passport number to be validated.", + "Supported Passport Formats": "Supported Passport Formats", + "United States: 9 digits (e.g., '123456789')": "United States: 9 digits (e.g., '123456789')", + "United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')": "United Kingdom: 2 uppercase letters followed by 6 digits (e.g., 'AB123456')", + "Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')": "Germany: 2 uppercase letters followed by 8 digits (e.g., 'AB12345678')", + "Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')": "Canada: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + "Australia: 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')": "Brazil: 9 digits (e.g., '123456789')", + "France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')": "France: 2 uppercase letters followed by 7 digits (e.g., 'AB1234567')", + "Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')": "Italy: 1 uppercase letter followed by 7 digits (e.g., 'A1234567')", + "India: 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')": "China: 1 uppercase letter followed by 8 digits (e.g., 'A12345678')", + + "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.": "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.", + "The password to be validated.": "The password to be validated.", + "[optional]": "[optional]", + "The minimum length allowed for the password. Default value: 1.": "The minimum length allowed for the password. Default value: 1.", + "The maximum length allowed for the password. Default value: Infinity.": "The maximum length allowed for the password. Default value: Infinity.", + "[optional] - An object with the following optional properties:": "[optional] - An object with the following optional properties:", + "Whether the password requires at least one uppercase letter. Default value: false.": "Whether the password requires at least one uppercase letter. Default value: false.", + "Whether the password requires at least one special character": "Whether the password requires at least one special character", + "Default value: false.": "Default value: false.", + "Whether the password requires at least one number. Default value: false.": "Whether the password requires at least one number. Default value: false.", + "Whether the password requires at least one letter. Default value: false.": "Whether the password requires at least one letter. Default value: false." } }