[
https://hibernate.onjira.com/browse/HV-554?page=com.atlassian.jira.plugin...
]
Hardy Ferentschik updated HV-554:
---------------------------------
Description:
It would be nice if @Email allowed for a regular expression like @URL does. For example,
we wanted to restrict emails to external addresses only (i.e. ending in .com, .net, etc.),
but the @Email validation allows internal addresses as well, for example bob@mycompany
instead of bob(a)mycompany.com. We had to write our own custom validation to handle this:
{noformat}
@Email(regexp="myRegexp")
{noformat}
was:
It would be nice if @Email allowed for a regular expression like @URL does. For example,
we wanted to restrict emails to external addresses only (i.e. ending in .com, .net, etc.),
but the @Email validation allows internal addresses as well, for example bob@mycompany
instead of bob(a)mycompany.com. We had to write our own custom validation to handle this.
@Email(regexp="myRegexp")
Pull Requests:
https://github.com/hibernate/hibernate-validator/pulls
Regular Expression for @Email
------------------------------
Key: HV-554
URL:
https://hibernate.onjira.com/browse/HV-554
Project: Hibernate Validator
Issue Type: Improvement
Components: validators
Affects Versions: 4.2.0.Final
Reporter: whardwick
Assignee: Hardy Ferentschik
Priority: Minor
Labels: @Email, expression, regex, regexp, regular
Fix For: 4.3.0.CR1
It would be nice if @Email allowed for a regular expression like @URL does. For example,
we wanted to restrict emails to external addresses only (i.e. ending in .com, .net, etc.),
but the @Email validation allows internal addresses as well, for example bob@mycompany
instead of bob(a)mycompany.com. We had to write our own custom validation to handle this:
{noformat}
@Email(regexp="myRegexp")
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira