-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[mielecloud] Less strict e-mail validation #10928
[mielecloud] Less strict e-mail validation #10928
Conversation
Signed-off-by: Björn Lange <[email protected]>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/miele-cloud-binding/93266/163 |
@NonNullByDefault | ||
public class EmailValidatorTest { | ||
@ParameterizedTest | ||
@ValueSource(strings = { "[email protected]", "[email protected]", "[email protected]" }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add testcases for the actual changes in this PR, for example allowing capital letters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some further test cases regarding the minimum length and uppercase letters. However, the previously already present test cases checked the style of the addresses that were reported to be problematic, namely ones that have numbers and dashes. Also capital letters are part of Java's \w
shortcut Pattern
syntax, so nothing should have changed in that regard in the backend validation. The frontend validation differed from that and I decided that it would be easier to understand if the regex in front- and backend would be as similar as possible and thus replaced \w
.
Signed-off-by: Björn Lange <[email protected]>
a7af07f
to
c1bf146
Compare
* [mielecloud] Less strict e-mail validation Signed-off-by: Björn Lange <[email protected]> * Some more e-mail validation test cases Signed-off-by: Björn Lange <[email protected]> Co-authored-by: Björn Lange <[email protected]> Signed-off-by: dw-8 <[email protected]>
This reverts commit e1df2b2.
* [mielecloud] Less strict e-mail validation Signed-off-by: Björn Lange <[email protected]> * Some more e-mail validation test cases Signed-off-by: Björn Lange <[email protected]> Co-authored-by: Björn Lange <[email protected]> Signed-off-by: dw-8 <[email protected]>
This reverts commit e1df2b2. Signed-off-by: dw-8 <[email protected]>
* [mielecloud] Less strict e-mail validation Signed-off-by: Björn Lange <[email protected]> * Some more e-mail validation test cases Signed-off-by: Björn Lange <[email protected]> Co-authored-by: Björn Lange <[email protected]>
* [mielecloud] Less strict e-mail validation Signed-off-by: Björn Lange <[email protected]> * Some more e-mail validation test cases Signed-off-by: Björn Lange <[email protected]> Co-authored-by: Björn Lange <[email protected]>
* [mielecloud] Less strict e-mail validation Signed-off-by: Björn Lange <[email protected]> * Some more e-mail validation test cases Signed-off-by: Björn Lange <[email protected]> Co-authored-by: Björn Lange <[email protected]>
Fixes #10927.
Signed-off-by: Björn Lange [email protected]