Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Refactor default to publication field type validation rules and allow arbitrary ones to be added #768

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Dec 21, 2022

Allows arbitrary Laravel validation rules to be specified in the schema file.

This should also allow for custom Laravel rules to be passed (as long as the validation keys can be deserialized.

This fixes a bug where the rules in the enum were not applied, as a result the enum validation rules have been refactored and simplified

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #768 (165da49) into publications-feature (07c89b3) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@                    Coverage Diff                     @@
##             publications-feature     #768      +/-   ##
==========================================================
- Coverage                   98.14%   98.11%   -0.04%     
+ Complexity                   2726     1357    -1369     
==========================================================
  Files                         320      160     -160     
  Lines                        7556     3764    -3792     
==========================================================
- Hits                         7416     3693    -3723     
+ Misses                        140       71      -69     
Impacted Files Coverage Δ
...rk/src/Console/Commands/MakePublicationCommand.php 69.62% <0.00%> (-1.27%) ⬇️
...rk/Features/Publications/PublicationFieldTypes.php 47.50% <0.00%> (ø)
.../Features/Publications/Models/PublicationField.php 100.00% <0.00%> (ø)
.../Features/Publications/Models/PublicationField.php
...rk/Features/Publications/PublicationFieldTypes.php
...ramework/src/Console/Commands/BuildSiteCommand.php
...mework/Features/DataCollections/DataCollection.php
...rk/src/Framework/Actions/AnonymousViewCompiler.php
...ages/framework/src/Markdown/Models/FrontMatter.php
...amework/Features/Navigation/BaseNavigationMenu.php
... and 153 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

caendesilva and others added 26 commits December 21, 2022 20:29
…tion-field-types' of github.com:hydephp/develop into allow-arbitrary-validation-rules-to-be-added-to-publication-field-types
@caendesilva caendesilva changed the title Allow arbitrary validation rules to be added to publication field types Refactor default to publication field type validation rules and allow arbitrary rules to be added Dec 21, 2022
@caendesilva caendesilva changed the title Refactor default to publication field type validation rules and allow arbitrary rules to be added Refactor default to publication field type validation rules and allow arbitrary ones to be added Dec 21, 2022
@caendesilva caendesilva marked this pull request as ready for review December 22, 2022 10:52
@caendesilva caendesilva merged commit 07b740a into publications-feature Dec 22, 2022
@caendesilva caendesilva deleted the allow-arbitrary-validation-rules-to-be-added-to-publication-field-types branch December 22, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants