app: Add a proper error message to the email field

This commit is contained in:
Valentin Tolmer 2021-10-11 20:31:35 +02:00 committed by nitnelave
parent 29832574c1
commit 88019a42c9

View File

@ -33,7 +33,7 @@ pub struct CreateUserForm {
pub struct CreateUserModel {
#[validate(length(min = 1, message = "Username is required"))]
username: String,
#[validate(email)]
#[validate(email(message = "A valid email is required"))]
email: String,
#[validate(length(min = 1, message = "Display name is required"))]
display_name: String,