fabform-email-validator
Version:
A lightweight, reliable email validation utility by FabForm — perfect for validating user emails with a solid regex and extra checks.
69 lines (39 loc) • 1.56 kB
Markdown
# fabform-email-validator
[](https://www.npmjs.com/package/fabform-email-validator)
[](LICENSE)
A lightweight, reliable email validation utility powered by FabForm.
Validate emails with a robust regex and simple extra checks to catch common invalid formats — perfect for client- or server-side validation.
## Features
- Simple function to validate emails with high accuracy
- Covers most valid email formats without allowing common invalid cases
- Lightweight: zero dependencies, tiny footprint
- Easy to integrate in any Node.js or frontend project
## Installation
```bash
npm install fabform-email-validator
````
## Usage
```js
const validateEmail = require('fabform-email-validator');
console.log(validateEmail('user@example.com')); // true
console.log(validateEmail('invalid-email@.com')); // false
```
## API
### `validateEmail(email: string): boolean`
Returns `true` if the email is valid, otherwise `false`.
## Sponsorship
This package is proudly sponsored by **[FabForm](https://fabform.io)** — the easiest way to build and deploy powerful forms without code.
Check out FabForm for form building, validation, and automation that scales with your needs.
## Contributing
Contributions and issues are welcome! Please submit pull requests or open issues on [GitHub](https://github.com/fabforms/fabform-email-validator).
## License
MIT © FabForm
```