Open
Conversation
zero88
reviewed
Jan 25, 2019
Contributor
zero88
left a comment
There was a problem hiding this comment.
- Introduce
DataTypeValidationwithabstract classTypemethod, then all kinds such asStringValidation,DoubleValidationextends on this class. Testno needlogger, usesystem.out. If you need logger, pls adapt to useTestHelperforsetupClass. RemoveTestBase, it doesn't existed anymore- Each
Testmethod must validate one case
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Str.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/validations/Dbl.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
Member
Author
|
@Zero-88 please proceed for reviewing... |
d252fe2 to
3022540
Compare
zero88
suggested changes
Jan 31, 2019
core/validator/src/main/java/com/nubeiot/core/validator/validations/Range.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/DataTypeValidation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/DataTypeValidation.java
Outdated
Show resolved
Hide resolved
core/validator/src/main/java/com/nubeiot/core/validator/Validation.java
Outdated
Show resolved
Hide resolved
Contributor
|
@RaiBnod
I suggest an another solution in package Thanks |
4626961 to
40c7cd5
Compare
6a42ecb to
821aaff
Compare
821aaff to
5455b97
Compare
Member
Author
|
Refactoring the ValidationBases are done. @Zero-88, could you please review the changes. |
f2047b4 to
68d3fa8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: #43
Basic idea of the validation base is extracted from joi.
Our validation base should able to do validation of Java primitives, objects as well as the JSON. And also it should able to assign some default values.