小编Sur*_*aju的帖子

RegEx包含字母数字和特殊字符

我要求允许字段的字母数字和某些其他字符.我正在使用这个正则表达式:

 "^[a-zA-Z0-9!@#$&()-`.+,/\"]*$".
Run Code Online (Sandbox Code Playgroud)

允许的特殊字符是! @ # $ & ( ) - ‘ . / + , “

但是当我用字符串"test_for_extended_alphanumeric"测试模式时,字符串通过了测试.我"_"不允许这种模式.我究竟做错了什么?

regex

19
推荐指数
2
解决办法
7万
查看次数

如何在Grails电子邮件服务中定制"从地址"

我对"来自"地址的电子邮件服务有疑问.我想显示一个名字,说XYZ而不是XYZ@abc.com.我试着让它有一个字符串"XYZ",但我收到了mailsend异常.

mailService.sendMail{
                from "XYZ"
                to "abc@123.com"
                subject "HI"
                body "How ru?"
            }
Run Code Online (Sandbox Code Playgroud)

例外情况是:

org.springframework.mail.MailSendException:
  Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 
    553 5.5.4 <XYZ>... Domain name required for sender address XYZ.
Run Code Online (Sandbox Code Playgroud)

有没有办法在邮件的coloumn中有别名而不是地址?

谢谢.

grails groovy spring sendmail

3
推荐指数
1
解决办法
984
查看次数

使用<g:select> grails

我使用a来显示个人资料名称列表.

<g:select name="ProfileSelector" from='${ProfileList?.profileName}' id='ProfileSelect' noSelection="['null':' SELECT VT']" disabled="true" />
Run Code Online (Sandbox Code Playgroud)

因此,配置文件列表是具有profilename,profileid,profileDescription的配置文件的类型.在提交时,我只能访问在控制器中选择为param的profileName.是否有任何方法可以将相应profileName的profileId作为param传递.

grails gsp grails-controller grails-2.0

0
推荐指数
1
解决办法
4360
查看次数

标签 统计

grails ×2

grails-2.0 ×1

grails-controller ×1

groovy ×1

gsp ×1

regex ×1

sendmail ×1

spring ×1