Open Closed

After setting <Nullable>enable</Nullable> getting "The XXX field is required" for ALL fields #3784


User avatar
0
a3x created
  • ABP Framework version: v5.3.4
  • UI type: MVCr
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:

In a project I set the attribute <Nullable>enable</Nullable> within all my projects (csproj) in order to allow nullable types.

After starting the application I get for all tables and fields the error message "Field XXX is required" However, the fields are not marked as required in the view, nor in any DTO.

How can I solve this one?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please try to set SuppressImplicitRequiredAttributeForNonNullableReferenceTypes of MvcOptions to true

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.mvcoptions.suppressimplicitrequiredattributefornonnullablereferencetypes?view=aspnetcore-6.0

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.