MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / ValidationParol

Method ValidationParol

Project_E-Commerce_App_V1.0/Header.h:56–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 // Friend Functions
55 //Validation Check for parol
56 friend void ValidationParol(Security User) {
57 if (User.Parol.length() >= 6 && User.Parol.length() <= 15) {
58 for (int i = 0; i < User.Parol.length(); i++) {
59 if (isupper(User.Parol[i])) { // Number of Upper Letters
60 Num_Upper += 1;
61 }
62 if (islower(User.Parol[i])) { // Number of Lower Letters
63 Num_Lower += 1;
64 }
65 if (isdigit(User.Parol[i])) { // Number of Digits
66 Num_Number += 1;
67 }
68 }
69 if (Num_Upper >= 1 && Num_Upper <= 10 && Num_Lower >= 4 && Num_Lower <= 10 && Num_Number >= 2 && Num_Number <= 10) {
70 Validation++;
71 Num_Upper = 0; Num_Lower = 0; Num_Number = 0;
72 }
73 else { Num_Upper = 0; Num_Lower = 0; Num_Number = 0; }
74 }
75 else { Num_Upper = 0; Num_Lower = 0; Num_Number = 0; }
76 }
77 //Validation Check for Name
78 friend void ValidationName(Security User) {
79 if (User.Name.length() >= 1 && User.Name.length() <= 15) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected