admin管理员组文章数量:1397093
I am validating some validators in javascript on the button client click event.
if (typeof (Page_Validators) != "undefined") {
for (var i = 0; i < Page_Validators.length; i++) {
ValidatorValidate(Page_Validators[i])
if (!Page_Validators[i].isvalid) {
alert("not valid");
}
else {
alert("valid");
}
}
}
But if i have more than one validation groups in the same page, then on the button click of one button will validate all the validators in the page, not the validators associated with that button's validation group.
So is there any way to only validate validators of a particular validation group from javascript?
I am validating some validators in javascript on the button client click event.
if (typeof (Page_Validators) != "undefined") {
for (var i = 0; i < Page_Validators.length; i++) {
ValidatorValidate(Page_Validators[i])
if (!Page_Validators[i].isvalid) {
alert("not valid");
}
else {
alert("valid");
}
}
}
But if i have more than one validation groups in the same page, then on the button click of one button will validate all the validators in the page, not the validators associated with that button's validation group.
So is there any way to only validate validators of a particular validation group from javascript?
Share Improve this question asked May 8, 2012 at 15:04 Mahesh KPMahesh KP 6,45613 gold badges53 silver badges71 bronze badges1 Answer
Reset to default 6Try
Page_ClientValidate('ValidationGroup');
本文标签: aspnetValidate particular validation group from javascriptStack Overflow
版权声明:本文标题:asp.net - Validate particular validation group from javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744148702a2592962.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论