reformat file

This commit is contained in:
bitfl0wer 2023-04-16 14:55:13 +02:00
parent 6cba2f93e1
commit fc397672f5
1 changed files with 1 additions and 3 deletions

View File

@ -1,5 +1,4 @@
pub mod schemas {
use std::error::Error;
use std::fmt;
use regex::Regex;
@ -82,8 +81,7 @@ pub mod schemas {
});
}
let regex =
regex::Regex::new(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$").unwrap();
let regex = Regex::new(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$").unwrap();
if email.clone().is_some() && !regex.is_match(email.clone().unwrap().as_str()) {
return Err(RegisterSchemaError {
message: "The provided email address is in an invalid format.".to_string(),