Check email
This commit is contained in:
@ -17,7 +17,10 @@ pub async fn create_account(
|
||||
) -> actix_web::Result<HttpResponse> {
|
||||
// TODO : rate limiting
|
||||
|
||||
// TODO : check if email is valid
|
||||
// Check if email is valid
|
||||
if !mailchecker::is_valid(&req.email) {
|
||||
return Ok(HttpResponse::BadRequest().json("Email address is invalid!"));
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
let constraints = StaticConstraints::default();
|
||||
|
Reference in New Issue
Block a user