Home > Guides > Core Developers Guide > Validation > email validator |
EmailValidator checks that a given String field, if not empty, is a valid email address.
The regular expression used to validate that the string is an email address is:
\\b^['_a-z0-9-\\+](\\.['_a-z0-9-\\+])@[a-z0-9-](\\.[a-z0-9-])\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\\b
You can also specify expression, caseSensitive and trim params as a OGNL expression, see the example below.
Warning
Do not use ${regexExpression}, ${caseSensitiveExpression} and ${trimExpression} as an expression as this will turn into infinitive loop!