JavaScript Coding Challenge/Interview Question: Password Validator

Published: 19 March 2020
on channel: Daily Coding Challenges
84
1

/*
Write a program that validates passwords to match a specific set of rules.
A valid password is one that conforms to the following set of rules:
1.Minimum length is 5
2.Maximum length is 10
3.should contain at least 1 number
4.should contain at least one special character(!@#$%^&*)
5.should not contain spaces
*/


console.log(passwordValidator("KRN23!#r")); //true
console.log(passwordValidator("KWPufgg")); // false
console.log(passwordValidator("uuGG!e")); //false
console.log(passwordValidator("wpf3f")); //false
console.log(passwordValidator("kdGP44#@5gyNME")); //false
console.log(passwordValidator("K3@o")); //false
console.log(passwordValidator("KG 2!olp%1")); //false
console.log(passwordValidator("4Pl3@bW7")); //true


On this page of the site you can watch the video online JavaScript Coding Challenge/Interview Question: Password Validator with a duration of hours minute second in good quality, which was uploaded by the user Daily Coding Challenges 19 March 2020, share the link with friends and acquaintances, this video has already been watched 84 times on youtube and it was liked by 1 viewers. Enjoy your viewing!