1.0.0 • Published 11 months ago

disposable-email-blocker-vue-2 v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

🛡️ Vue 2 Disposable email blocker

Detect and Block if new account registrations are using disposable email services.

Vue 2 Demo

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 version NPM bundle size npm download

$ 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

PlatformURLStatus
wordpresswordpress-disposable-email-blocker
MyBBmybb-disposable-email-blocker
LiteCartlitecart-disposable-email-blocker
Cloudflarecloudflare-disposable-email-blocker
Vue 2disposable-email-blocker-vue-2
Joomla🚧
Drupal🚧

License

GitHub license