Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for @Email with BeanValidationStrategy #311

Closed
msteiger opened this issue Dec 19, 2022 · 5 comments
Closed

Add support for @Email with BeanValidationStrategy #311

msteiger opened this issue Dec 19, 2022 · 5 comments
Assignees

Comments

@msteiger
Copy link

Similar to #218 I think that a strategy for EMail strings should be implemented. The docs state that javax.validation.constraints are supported, but it does not yet work for @Email.

I could make a PR similar to what the email example in the docs suggest. Some Latin chars, the at-symbol, some Latin chars, dot, 2-3 Latin chars.

@daivanov
Copy link
Collaborator

Hi,

Email was added in Java EE 8, while, we still support only Java EE 7. This would require updating dependencies and drop of Java 6 and Java 7 support.

Thanks, Daniil

@msteiger
Copy link
Author

Thanks for the clarification. What about adding the email validator to the package without tying it to the @Email annotation? A bit inconsistent maybe? But maybe helpful enough to be worth it?

I think that it's also possible to compile it properly with @Email annotation on Java 8+ and just set the "targetCompatibility" to 1.7. This should make it work correctly on Java 8 target systems but still be compatible with Java EE 7 (without the @Email functionality).

@daivanov
Copy link
Collaborator

Hi,

source and target are not working properly in Oracle Java compiler. Target just sets version to the bytecode without any validation. Then during execution one will get UnsupportedClassVersionError exception. This makes it extremely dangerous feature marginally being useless.

You could do PR and we can think how to merge it smartly.

Thanks, Daniil

@daivanov
Copy link
Collaborator

Fixed in Podam 8.0.0 or later

@msteiger
Copy link
Author

Very nice! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants