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(entity)!: validate value after applying transform #368

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

MohitKS5
Copy link
Contributor

@MohitKS5 MohitKS5 commented Nov 16, 2022

Issue

  • Validate type function is called before transform function. It allows user to do anything in transform including return invalid values.
  • Transform receives abridged value not the one supplied by user due to alterations by validateType

Fix

Validate value type after transform. Also fixes #299 and similar issues.

Transform is supposed to receive (value, data) as arguments where value is supplied value not after type conversions like string to number. ValidateType function does this and various similar conversions for flexibility.

Signed-off-by: MohitKS5 <mohitkumarsingh907@gmail.com>
@MohitKS5 MohitKS5 marked this pull request as draft November 16, 2022 05:27
@MohitKS5 MohitKS5 marked this pull request as ready for review November 16, 2022 05:33
Copy link
Collaborator

@naorpeled naorpeled left a comment

Choose a reason for hiding this comment

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

LGTM 😎

Thanks for your contribution!

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.

DynamoDB createSet after transform call
2 participants