Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add validator that leverages symfony/validation constraints. #6

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

GuySartorelli
Copy link
Owner

Leverage the symfony/validation support that's being added in Silverstripe CMS 5.2

@GuySartorelli GuySartorelli marked this pull request as draft March 19, 2024 04:07
@GuySartorelli GuySartorelli force-pushed the pulls/2/constraints-validator branch 3 times, most recently from 8c971f9 to e19a294 Compare March 19, 2024 04:50
@GuySartorelli GuySartorelli force-pushed the pulls/2/constraints-validator branch from e19a294 to e95f111 Compare March 19, 2024 04:56
@GuySartorelli GuySartorelli marked this pull request as ready for review March 19, 2024 04:58
Copy link
Owner Author

@GuySartorelli GuySartorelli Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No point using a dedicated validator for this anymore - if you REALLY need regex validation, there's a constraint for that. But there may well be a constraint (or combination of constraints) to validate whatever you were validating in a cleaner way than regex (e.g. if you were checking IP addresses, use the Ip constraint) so check that before resorting to the regex constraint itself.

@GuySartorelli GuySartorelli merged commit c81b7ca into 2 Mar 19, 2024
24 checks passed
@GuySartorelli GuySartorelli deleted the pulls/2/constraints-validator branch March 19, 2024 22:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant