Details
Assignee
Yusuf AlamuYusuf AlamuReporter
Yusuf AlamuYusuf AlamuLabels
Participants
Yusuf AlamuComponents
Priority
Major
Details
Details
Assignee
Yusuf Alamu
Yusuf AlamuReporter
Yusuf Alamu
Yusuf AlamuLabels
Participants
Yusuf Alamu
Components
Priority
Created December 19, 2024 at 8:19 PM
Updated December 30, 2024 at 4:01 PM
I would like to contribute a new
OneOfValidator
for the Hibernate Validator project.This validator checks if a given
CharSequence
matches one of the allowed values specified in theOneOf
annotation.Features:
Validates if a
CharSequence
is one of the allowed values.Supports case-sensitive and case-insensitive validation based on the
ignoreCase
flag in theOneOf
annotation.Supports both Enum constants and manually provided allowed values.
The validator has been implemented as follows:
OneOfValidator
class implementsConstraintValidator<OneOf, CharSequence>
.Adds values from
allowedValues()
andenumClass()
in theOneOf
annotation for validation.Provides methods to handle case-sensitive and case-insensitive validation.