forum

Home / DeveloperSection / Forums / How to manually check if model is valid or not

How to manually check if model is valid or not

Anonymous User 1278 29-Apr-2018

I want to check the data is valid or not

 public ActionResult ValidCheck(student model)

    {

        Models.ViewModel.User model = new Models.ViewModel.User();
        model.Age = 12;
        model.Name = "Andy He";
        model.Email = "123";
        //TryValidateModel(model);
     }

could you help me?


Updated on 18-Jun-2023
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By