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
This npm package provides JavaScript functions to validate various forms fields.
If you want to help me, you can 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!
https://cdn.jsdelivr.net/npm/multiform-validator@2.1.2/dist/bundle.min.js
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.2/dist/bundle.min.js"></script>
https://unpkg.com/multiform-validator@2.1.2/dist/bundle.js
<script src="https://unpkg.com/multiform-validator@2.1.2/dist/bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/multiform-validator@2.1.2/dist/bundle.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
yarn add multiform-validator
This package contains various modules for validating different types of data. Below are the available validation modules:
if you prefer, you can use importing as:
const validator = require('multiform-validator');
// or
import validator from 'multiform-validator';
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';
/**
* There are other returns in some functions, with strings etc, stay tuned
*/
If you want to help me, you can 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!