Skip to content

Commit ac54952

Browse files
committed
Add README
1 parent 772cc22 commit ac54952

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Custom Validation Annotations for Spring Boot
2+
3+
This repository provides a collection of custom validation annotations for use with Spring Boot applications. These
4+
annotations help you enforce specific validation rules in your application by adding meaningful constraints (even though
5+
some of them are just for fun) to your data models.
6+
7+
## Custom Validation Annotations
8+
9+
### Age
10+
11+
The `@Age` annotation ensures that a `LocalDate` field represents an age within a specified range.
12+
13+
### AtLeastOneNotBlank
14+
15+
The `@AtLeastOneNotBlank` annotation validates whether at least one of the specified fields is not blank (non-empty).
16+
17+
### ExcludedNumbers
18+
19+
The `@ExcludedNumbers` annotation checks that a field's value is not one of the specified excluded numbers.
20+
21+
### Fibonacci
22+
23+
The `@Fibonacci` annotation validates whether a field's value is a number within the Fibonacci series.
24+
25+
### IntegerValues
26+
27+
The `@IntegerValues` annotation ensures that a field's value is one of the specified integer values.
28+
29+
### ISO3166CountryCode
30+
31+
The `@ISO3166CountryCode` annotation checks whether a field's value represents a valid ISO 3166-1 country code (either
32+
alpha-2 or alpha-3).

0 commit comments

Comments
 (0)