0.0.2 • Published 5 years ago

cdl-validatepassword v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Password Validation

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

Installation instruction

npm install cdl-validatepassword --save

Instruction to use the package

How to use?

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

//in module
import { ValidatepasswordModule } from 'cdl-validatepassword'; 

imports: [
    ValidatepasswordModule
]

// In your component ts file

import { ValidatepasswordService } from 'cdl-validatepassword';

First way to utilize service

// Extend service to utilize its functions

export class AppComponent extends ValidatepasswordService {

    constructor() {
        super();
    }

    ngOnInit() {
        //Return success or error message
        this.isValidPassword('Test@123')
    }
}

Second way to utilize service

// Initilize service to constructor

export class AppComponent {

    constructor(private validatepasswordService: ValidatepasswordService) {
        //TODO:
    }

    ngOnInit() {
        //Return success or error message
        this.validatepasswordService.isValidPassword('Test@123');
    }
}