Files
Training-Team2-Zenvy-Jan26/Trenser.Zenvy/Trenser.Zenvy/utilities/Validator.h
T
joelthomastrenser 133785dd3f refactor: change memory management and fix related code
- Switched shared_ptr to raw pointers
- Added cleanup logic in DataStore
- Fixed Factory object creation
- Updated function signatures to match changes
- Small refactors and formatting fixes
2026-04-17 09:36:34 +05:30

27 lines
782 B
C++

/*
* File: Validator.h
* Description: Validates inputs like phone number, email, password
* Author: Trenser
* Created: 01-Apr-2026
*/
#pragma once
#include<string>
#include<map>
#include<memory>
#include<vector>
#include<algorithm>
#include<cctype>
#include "Enums.h"
class Employee;
namespace util
{
bool isPhoneNumberValid(const std::string&);
bool isEmailValid(const std::string&);
bool isPasswordValid(const std::string&);
bool hasActiveEmployeeOfType(Enums::EmployeeType, const std::map<std::string, Employee*>&);
bool isEmailDuplicate(const std::string&, const std::map<std::string, Employee*>&);
bool isPhoneDuplicate(const std::string&, const std::map<std::string, Employee*>&);
bool isPhoneDuplicate(const std::string&, const std::vector<const Employee*>&);
}