jenyaatnow / jenyaatnow/validator4j

Add validation groups support

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

We should provide the ability to apply different validation rules depending on particular validation groups. To achieve this we should do the following:

  • extend ValidatableReference#validate and ValidatableCollection#validateEach with argument Class<?>... groups - this way we'll configure each validation rules set to be used with particular validation groups
  • extend ValidatableObject#validate with argument Class<?>... groups - this way we'll trigger validation according to passed validation groups

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating ValidatableReference#validate, ValidatableCollection#validateEach, and ValidatableObject#validate, then trace how validation rules are selected and invoked. Define how the Class<?>... groups arguments propagate through these APIs and verify that each validation set runs only for its selected groups. The issue names no tests, so inspect existing validation tests or generated-code coverage before adding focused cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.