开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜