Merge pull request #193 from taoweicn/patch-1

Add email address validation
pull/195/head
John Niang 2019-06-09 11:12:18 +08:00 committed by GitHub
commit 56243d9fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

8
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,8 @@
# These are supported funding model platforms
github: [ruibaby]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: https://pay.ryanc.cc

View File

@ -2,6 +2,7 @@ package run.halo.app.model.params;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
/**
@ -14,6 +15,7 @@ import javax.validation.constraints.NotBlank;
public class MailParam {
@NotBlank(message = "收件人不能为空")
@Email(message = "邮箱格式错误")
private String to;
@NotBlank(message = "主题不能为空")