Using Chrome PostMan, I noticed that if I post to an action method without passing any form parameters the ModelState.IsValid
returns true even if I have [Required]
validation attribute set on the model properties.
The weird thing is that the Model
passed as a parameter has a value of null
even though IsValid
is true
.
Is there a way to intercept the Model
from OnActionExecuting
to check if the Model is null and handle the situation appropriately or is there a better way to ensure IsValid
returns false
in this case?