yiisoft / yiisoft/hydrator-validator
rename attribute Validate
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 14
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
The issue is that when reading such a declaration, it’s not clear that the Validate attribute does not work with Compare, because it operates only on raw input data before those values are actually assigned to the class properties.
#[Body('email')]
#[Trim]
#[Validate(
new Required(),
new Email(),
)]
In this example, it’s not obvious from the Validate attribute itself that the validation is performed only on the raw data.
I suggest renaming the #[Validate] attribute to #[ValidateRaw].
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the #[Validate] attribute definition and every usage in the repository, then check how the example relates to raw-data validation. Done means the attribute is consistently renamed to #[ValidateRaw] without leaving misleading #[Validate] references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100