mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Implements complete validation rules for adding a book.
This commit is contained in:
1 parent
0eb7b453f6
commit
ed0d341513
8 files changed
+254
-78
No files matched your search
@@ -41,7 +41,7 @@ public class Genre : ValueObject
|
||||
public static ErrorOr<Genre> Create(string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
return Errors.Errors.Metadata.GenreCannotBeEmpty;
|
||||
return Errors.Errors.Metadata.GenreNameCannotBeEmpty;
|
||||
return new Genre(name);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user