133785dd3f
- 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
27 lines
782 B
C++
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*>&);
|
|
} |