Skip to content

Refactor domain primitives and update validation methods #11

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

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

temonk
Copy link
Contributor

@temonk temonk commented Jun 3, 2024

This commit includes a major refactoring of domain primitives and updates to validation methods.

  • The Validate method now returns a PrimitiveValidationResult instead of throwing an InvalidDomainValueException.
  • New TryCreate methods have been added to all domain primitive classes, which attempt to create an instance and return a boolean indicating success or failure.
  • The InvalidDomainValueException now includes a reference to the instance that caused the exception.
  • A new type PrimitiveValidationResult has been introduced, which includes IsValid and ErrorMessage properties.
  • NuGet packages in all projects have been updated to the latest versions.
  • Tests have been modified to support the new signatures.

This commit includes a major refactoring of domain primitives and updates to validation methods.

- The `Validate` method now returns a `PrimitiveValidationResult` instead of throwing an `InvalidDomainValueException`.
- New `TryCreate` methods have been added to all domain primitive classes, which attempt to create an instance and return a boolean indicating success or failure.
- The `InvalidDomainValueException` now includes a reference to the instance that caused the exception.
- A new type `PrimitiveValidationResult` has been introduced, which includes `IsValid` and `ErrorMessage` properties.
- NuGet packages in all projects have been updated to the latest versions.
- Tests have been modified to support the new signatures.
@GregoryNikolaishvili GregoryNikolaishvili merged commit 32590e2 into main Jun 3, 2024
2 checks passed
@temonk temonk deleted the feature/ValidationUpdates branch June 19, 2024 07:50
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