validation - In Grails, how to allow newer DNS in email validator constraint? -


static constraints = {     email email:true } 

this constraint treats test@email.wtf invalid. how allow newer dns '.wtf' valid email?

i create customemailvalidator extending org.apache.commons.validator.routines.emailvalidator, using class similar org.codehaus.groovy.grails.validation.routines.domainvalidator additional dns.

but there simpler way it?

if ok not matching new domains specifically, relax email rules this:

static constraints = {   email(matches: '^\\w+@[a-za-z_]+?\\.[a-za-z]{2,63}$') } 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -