MVC 3 client side validation on textbox list
If I allow the user to add text boxes to a view how can I still have my model validation work correctly? I want to be able to send back an array of FanId's to check (which I have done successfully). The problem is that remote validation on each text box sends back the value of the first text box.
Model:
[DisplayName("User ID")]
[Remote("ValidateUser","Template",ErrorMessage = "Invalid User I开发者_运维知识库d")]
public string[] FanId { get; set; }
Currently I am hard coding the inputs to be added.
精彩评论