disposable-email-blocker-vue-2
v1.0.0
Published
Detect and Block if new account registrations are using disposable email services with vue 2.
Downloads
2
Maintainers
Readme
🛡️ Vue 2 Disposable email blocker
Detect and Block if new account registrations are using disposable email services.
The Disposable email blocker provide :
- 🛡️ Protects all HTML forms.
- 🛡️ Detects invalid email addresses and domains
- 🛡️ Blocks disposable email services
- 🛡️ Blocks webmail email services
- 🛡️ Custom error messages
- 🛡️ Disposable data daily updates to stay ahead of fake users
How to use
Install
$ npm install disposable-email-blocker-vue-2 --save
# or
$ yarn add disposable-email-blocker-vue-2
Usage
import Blocker from 'disposable-email-blocker-vue-2';
Vue.use(Blocker);
Options
The Blocker parameter.
Simple options
const defaults = {
apiUrl: 'string',
data: 'TombaStatusResponse[]',
disposable: {
message: 'string',
},
webmail: {
message: 'string',
block: false,
},
emailError: {
className: 'string',
style: `string`,
},
};
Vue.use(Blocker, defaults);
apiUrl
API URL.data
Data structure.disposable.message
disposable error message.webmail.message
webmail error message.webmail.block
block webmail emails.emailError.className
HTML tag class .emailError.style
css style.
Custom disposable message
To disposable message:
const defaults = {
disposable: {
message:
'Abuses, strongly encourage you to stop using disposable email',
},
};
Vue.use(Blocker, defaults);
Custom webmail message
To webmail message:
const defaults = {
webmail: {
message:
'Warning, You can create an account with this email address, but we strongly encourage you to use a professional email address',
},
};
Vue.use(Blocker, defaults);
Custom API URL
const defaults = {
apiUrl: 'string',
};
Vue.use(Blocker, defaults);
Custom DATA
This will stop API call
const defaults = {
data: [
{
domain: 'coronafleet.com',
webmail: true,
disposable: false,
},
],
};
Vue.use(Blocker, defaults);
Block webmail emails
const defaults = {
webmail: {
block: true,
},
};
Vue.use(Blocker, defaults);
Instance property
To access the API functions, call the $blocker anywhere in your components.
this.$blocker;
Event handling
use the on()
API method.
Available Event name done
the Content is revealed on onInput
his.$blocker.on('done', (e) => {
// place your code here
});
Free Plugins / Forum / E-Commerce / CMS
| Platform | URL | Status | | ---------- | ------------------------------------------------------------------------------------------------------ | ------ | | wordpress | wordpress-disposable-email-blocker | ✅ | | MyBB | mybb-disposable-email-blocker | ✅ | | LiteCart | litecart-disposable-email-blocker | ✅ | | Cloudflare | cloudflare-disposable-email-blocker | ✅ | | Vue 2 | disposable-email-blocker-vue-2 | ✅ | | Joomla | | 🚧 | | Drupal | | 🚧 |