This project provides additional features and extensions for Jakarta Validation (Bean Validation). It includes custom validation annotations.
A small project to experiment with publishing artifacts to Maven Central and see what eventually comes of it.
Add library as dependency to Maven or Gradle. See the actual versions on Maven Central. Java 11 or higher is required to use this library.
- Maven
<dependency> <groupId>io.github.malczuuu</groupId> <artifactId>jakarta-validation-extensions</artifactId> <version>1.1.0</version> </dependency>
- Gradle
dependencies { implementation("io.github.malczuuu:jakarta-validation-extensions:1.1.0") }
@OneOf
- validates that a value is one of the specified values. Supported types includeCharSequence
(generic forString
in particular, but alsoStringBuilder
etc.),Number
,Enum
andCharacter
.@Alphanumeric
- validates that a value contains only alphanumeric characters (a-z
,A-Z
,0-9
), with optional characters to ignore. Supported types includeCharSequence
, andCharacter
.
This project follows Semantic Versioning.
Expand...
To build the project from source, ensure you have Java 17 or higher. Yes, Java 17 is required to build the project, but it should produce artifacts compatible with Java 11.
./gradlew clean build
./gradlew -Pversion=XXXX clean build publishToMavenLocal