-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
We need to validate an object of class A differently in different situations, and we use validation groups for that in the backend.
Now we would like to use valdr in the frontend, but there is no support for validation groups.
We are planning to implement support for validation groups in our own copy of valdr-bean-validation, but would ultimately like to see that feature pulled into valdr-bean-validation.
Our rough plan is as follows:
- Add a new config parameter "includeValidationGroups" default false.
- When that is enabled, add any groups defined in the bean constraint annotations into the generated JSON:
"Plan": {
"name": {
"size": {
"min": 2,
"message": "{javax.validation.constraints.Size.message}",
"max": 255,
"groups": [
"ValidationGroup.Active.class"
]
}
}
}My question is: would you consider a PR on this feature? If so, is the above approach ok?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels