I am working on an ASP.NET Core MVC project. Currently, I'm trying to add actors from Create.cshtml view. The view has three fields and all of them are required:
- ProfilePictureURL
- FullName
- Bio
I'm making these fields required with some data annotation attributes in the model.
In the controller, I am using [Bind] data annotation in the parentheses of the respective action method. Inside of its body I'm checking !ModelState.IsValid which is expected to be false. On the contrary, it's true and I don't get it why.
Here are some screenshots of model, controller and view.
Controller:
Model:
View:
Can anyone tell me why my !IsModelState.IsValid is always true?
Thanks in advance 😊




