cdl-validateemail
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Email Validation

This is a simple packege which is developed using javascript regular expression.

Installation instruction

npm install cdl-validateemail --save

Instruction to use the package

How to use?

Please follow below instruction to implement local storage in your angular application.

//in module
import { ValidateemailModule } from 'cdl-validateemail'; 

imports: [
    ValidateemailModule
]

// In your component ts file

import { ValidateemailService } from 'cdl-validateemail';

First way to utilize service

// Extend service to utilize its functions

export class AppComponent extends ValidateemailService {

    constructor() {
        super();
    }

    ngOnInit() {

        //Return success or error message
        this.isValidEmail('test@gmail.com');
    }
}

Second way to utilize service

// Initilize service to constructor

export class AppComponent {

    constructor(private validateemailService: ValidateemailService) {
        //TODO:
    }

    ngOnInit() {

        //Return success or error message
        this.validateemailService.isValidEmail('test@gmail.com');
    }
}

Package Sidebar

Install

npm i cdl-validateemail

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

29 kB

Total Files

23

Last publish

Collaborators

  • rsolanki