
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
multiform-validator
Advanced tools
Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.
[!NOTE] I accept help to make the version of the other programming languages.
This npm package provides JavaScript functions to validate various forms fields.
Documentation: https://multiformvalidator.netlify.app
Feel free to find bugs and report them to me. Your feedback is highly appreciated. Hugs from Gabriel Logan!
jsDelivr:
https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js"></script>
unpkg:
https://unpkg.com/multiform-validator@2.1.9/dist/index.js
<script src="https://unpkg.com/multiform-validator@2.1.9/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.9/dist/index.min.js"></script>
<script>
const emailResult = isEmail("123456");
const cpfResult = cpfIsValid("123456");
console.log(emailResult); // returns false
console.log(cpfResult.isValid); // returns false
</script>
npm install multiform-validator
or
yarn add multiform-validator
This package contains various modules for validating different types of data. Below are the available validation modules:

const validator = require("multiform-validator");
// or
import validator from "multiform-validator";
or;
// Attention, FUNCTION_NAME is not a valid function name! It is just an example of how to import the functions.
const { FUNCTION_NAME } = require("multiform-validator");
// or
import { FUNCTION_NAME } from "multiform-validator";
const validator = require('multiform-validator');
// or
import validator from 'multiform-validator';
// then
validator.FUNCTION_NAME
// OBS: 'if the function is called validate, the return will be an object and not boolean'
// When return object boolean
validator.FUNCTION_NAME = true or false
// When return object
validator.FUNCTION_NAME = object = { isValid: true or false, errorMsg: 'stringError' }
validator.FUNCTION_NAME.isValid = true or false
validator.FUNCTION_NAME.errorMsg = 'ErrorMsg' // You can customize errors
/**
* There are other returns in some functions, with strings etc, stay tuned
*/
const { validateEmail } = require("multiform-validator");
// or
import { validateEmail } from "multiform-validator";
// It has many more validations, you can read the documentation or
// do several tests to learn how to use the library in the best possible way.
// Two last parameters are optional
console.log(
validateEmail("email@email.com", { maxLength: 30, country: "br" }).isValid,
); // returns false
console.log(
validateEmail("email@email.com.br", { maxLength: 30, country: "br" }).isValid,
); // returns true
console.log(validateEmail("email@email.com", { maxLength: 30 }).isValid); // returns true
// All examples return default messages, below is an example setting your own messages
// If you want to use a default parameter, use null.
const validationResult = validateEmail("email@email.com", { maxLength: 30 });
if (validationResult.isValid) {
console.log("0 errors");
} else {
console.log(validationResult.errorMsg); // returns the error
}
// or
const validationResult = validateEmail("1email@email.com", {
maxLength: 30,
errorMsg: [null, "This is an invalid email with my own errors"],
});
if (validationResult.isValid) {
console.log("0 errors");
} else {
console.log(validationResult.errorMsg); // Return 'This is an invalid email with my own errors'
}
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!
If you want to help me, you can buy me a coffee (:
FAQs
Javascript library made to validate, several form fields, such as: email, images, phone, password, cpf etc.
We found that multiform-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.