Closed
Description
Description
In the last example for data annotations, the [Required] annotations are changed with only Genre
using [Required]
. The rest should have a nullable type indicator ?
present.
Example:
public string Title { get; set; }
should be:
public string? Title { get; set; }
Page URL
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/validation?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/first-mvc-app/validation.md
Document ID
12fe9329-2cef-4056-4986-18ed7ae5c397
Article author
Metadata
- ID: 443a7c53-cc16-7ed5-5950-46a6f195f19c
- Service: aspnet-core
- Sub-service: tutorials
Activity
3 remaining items