your-form-validation
v1.0.5
Published
```npm i your-form-validation```
Downloads
3
Maintainers
Readme
##Install Package terlebih dahulu
npm i your-form-validation
Penggunaan:
const formValidation = require('form-validation');
const formData = {
name: 'John Doe',
email: '[email protected]',
password: '12345678',
};
const validationResult = formValidation(formData);
if (validationResult.success) {
// Formulir valid
console.log('Formulir valid!');
} else {
// Formulir tidak valid
console.log('Formulir tidak valid!');
console.log(validationResult.errors);
}