79623741

Date: 2025-05-15 15:44:29
Score: 1
Natty:
Report link

I know this is an old post

If you use non-nullable types (like int, DateTime), they always have a default value (e.g., 0), so [Required] won’t catch them being "empty."

Fix: Use nullable types if you want [Required] to validate them:

[Required]
public int? AquiferID { get; set; }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user23509