Thanks for your quick answer! I modified my model and removed the line
and added these lines in the controller:
public ActionResult Register(RegisterModel model)
RegisterModelValidator rmv = new RegisterModelValidator("Message passed as param");
var result = rmv.Validate(model);
foreach (var Error in result.Errors)
It works well, but I have two new problems:
- The CSS class
input-validation-error is not added to the
- The client-side validation does not work anymore.
Do you have an idea how to solve these?