Translation (WIP)

This commit is contained in:
Greg Burri 2025-01-05 22:38:46 +01:00
parent 9b0fcec5e2
commit e9873c1943
29 changed files with 586 additions and 285 deletions

View file

@ -2,6 +2,8 @@ use std::sync::LazyLock;
use regex::Regex;
use crate::consts;
pub enum EmailValidation {
Ok,
NotValid,
@ -28,7 +30,7 @@ pub enum PasswordValidation {
}
pub fn validate_password(password: &str) -> PasswordValidation {
if password.len() < 8 {
if password.len() < consts::MIN_PASSWORD_SIZE {
PasswordValidation::TooShort
} else {
PasswordValidation::Ok