rotterdam-cs / rcsnewsletter

The aim of this project is to fulfill with all the features of a Newsletter
http://www.rotterdam-cs.com/-/liferay-newsletter
15 stars 14 forks source link

Error when trying to register email with ' - ' symbol in it #10

Open Samueel opened 12 years ago

Samueel commented 12 years ago

When user tries to register newsletter with email address which have ' - ' symbol (line) in it, registering portlet gives next error:

email must match "^[_A-Za-z0-9-]+(.[A-Za-z0-9-]+)@[A-Za-z0-9]+(.[A-Za-z0-9]+)_(.[A-Za-z]{2,})$"

Is it possible to change that syntax so it will accept email addresses like "somebody@some-where.com" ? And if it is possible, where i can do this?

Samueel commented 12 years ago

Have you found any solutions for this?

alvartaco commented 12 years ago

Hi Samuel...

At the moment we are working on other issues, ASAP we have news, we will add a comment. The same for a new release that will include the fix for your reported issue.

Kind Regards Alejandro

alvartaco commented 12 years ago

Hello Samueel, The issue was resolved. You can download the src code and build the plugin by yourself. Or you can wait until our next release, that will have solved this and other issues. Thanks.! Alejandro

eradan commented 12 years ago

Hello Alejandro,

the bug has been resolved on liferay 6.0 branch also?

Cheers, Ivan

alvartaco commented 12 years ago

Hello Ivan,

Thank you for contacting us.

We are not currently giving support to version 6.0.x of the protlet. We suggest you to downlod changes from branch 6.1 and apply them if you want.

Kind regards Alejandro

eradan commented 12 years ago

Ok, thanks

alvartaco commented 12 years ago

You can check this class (NewsletterSubscriptor) to add changes and build the portlet modified.

The pattern is specified in this line: @Pattern(regexp = "^[_A-Za-z0-9-]+(.[A-Za-z0-9-]+)@[A-Za-z0-9-]+(.[A-Za-z0-9]+)(.[A-Za-z]{2,})$")

public class NewsletterSubscriptor extends NewsletterEntity { public static final String EMAIL = "email"; private static final long serialVersionUID = 1L; private String firstName; private String lastName; @NotBlank //#7392 @Pattern(regexp = "^[_A-Za-z0-9-]+(.[A-Za-z0-9-]+)@[A-Za-z0-9-]+(.[A-Za-z0-9]+)(.[A-Za-z]{2,})$") private String email;

Regards Alejandro