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
parent 2994f6d168
commit 3994b4cf48

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,