Translation (WIP)
This commit is contained in:
parent
9b0fcec5e2
commit
e9873c1943
29 changed files with 586 additions and 285 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue