cdl-validateemail
v0.0.1
Published
This is a simple packege which is developed using javascript regular expression.
Downloads
1
Maintainers
Readme
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('[email protected]');
}
}
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('[email protected]');
}
}