提交 397d4519 编写于 作者: K kohsuke

Added a form validation check to detect typical errors like...

Added a form validation check to detect typical errors like http://www.nabble.com/cannot-setup-email-account-td25727896.html

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@22378 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6f0c7ec9
......@@ -392,6 +392,13 @@ public class Mailer extends Notifier {
return doAddressCheck(value);
}
public FormValidation doCheckDefaultSuffix(@QueryParameter String value) {
if (value.matches("@[A-Za-z0-9.\\-]+") || Util.fixEmptyAndTrim(value)==null)
return FormValidation.ok();
else
return FormValidation.error("This field should be '@' followed by a domain name.");
}
/**
* Send an email to the admin address
* @throws IOException
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册