-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from sashirestela/13-validate-fields-declared-…
…in-parent-classes Validate fields declared in parent classes
- Loading branch information
Showing
4 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
27 changes: 27 additions & 0 deletions
27
src/test/java/io/github/sashirestela/slimvalidator/data/AbstractClass.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.github.sashirestela.slimvalidator.data; | ||
|
||
import io.github.sashirestela.slimvalidator.constraints.Range; | ||
import io.github.sashirestela.slimvalidator.constraints.Required; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@Getter | ||
@SuperBuilder | ||
public abstract class AbstractClass { | ||
|
||
@Required | ||
protected String name; | ||
|
||
@Range(min = 1, max = 10) | ||
protected Integer level; | ||
|
||
@Getter | ||
@SuperBuilder | ||
public static class ChildClass extends AbstractClass { | ||
|
||
@Required | ||
private String category; | ||
|
||
} | ||
|
||
} |