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

fix(validation): wrong condition for required field #99

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Conversation

jsulpis
Copy link
Member

@jsulpis jsulpis commented Jan 4, 2024

Description

The condition to check if a field is required returns an object, which is always truthy. I fixed the issue by reading the value property of said object, which returns whether the field is required or not.

How Has This Been Tested?

tested with unit tests and use of the pre-release in our internal repo

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@jsulpis jsulpis added 🐞 bug Something isn't working 🧑‍⚖️ Tech review needed Pull Request is ready for review, let's go ! Bedrock When the author is a member of the organization 🫀 Core Package updates labels Jan 4, 2024
@jsulpis jsulpis requested a review from TGianella January 4, 2024 11:00
Copy link
Collaborator

@TGianella TGianella left a comment

Choose a reason for hiding this comment

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

🔥 😭 🐳

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (740e3b1) 74.48% compared to head (de7182b) 74.68%.
Report is 4 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   74.48%   74.68%   +0.19%     
==========================================
  Files          28       28              
  Lines         388      391       +3     
  Branches      123      125       +2     
==========================================
+ Hits          289      292       +3     
  Misses         64       64              
  Partials       35       35              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsulpis jsulpis merged commit 3f19afc into master Jan 4, 2024
4 checks passed
@jsulpis jsulpis deleted the fix-required branch January 4, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bedrock When the author is a member of the organization 🐞 bug Something isn't working 🫀 Core Package updates 🧑‍⚖️ Tech review needed Pull Request is ready for review, let's go !
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants