Skip to content

Commit

Permalink
Merge pull request #377 from DomasM/docs/discover-normalize
Browse files Browse the repository at this point in the history
Make normalization easier to discover
  • Loading branch information
SteveDunn authored Mar 16, 2023
2 parents 7e66cf4 + bdee4f9 commit f8b6ab5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,15 @@ public void CanEnter(Age age) {
}
```

### Can I normalize value when VO is created

Yes, add NormalizeInput method, e.g.
```csharp
private static string NormalizeInput(string input) => input.Trim();
```
See [wiki](https://github.com/SteveDunn/Vogen/wiki/Normalization) for more information.


### Can I create custom Value Object attributes with my own defaults?

Yes, but (at the moment) it requires that you put your defaults in your attribute's constructor - not in the call to the base class' constructor (see [this comment](https://github.com/SteveDunn/Vogen/pull/321#issuecomment-1399324832)).
Expand Down

0 comments on commit f8b6ab5

Please sign in to comment.