我有问题。我必须将一个文本框与另外两个文本框进行比较,如果值匹配,则应显示错误消息。
我尝试了两个比较验证器,但一次只有一个比较验证器工作,所以只获取第一个值,看看我的代码。
<asp:CompareValidator ForeColor="Red" Font-Size="Small" runat="server"
ID="CompareValidator2" controltovalidate="txtsponsorfatherhusbandname"
controltocompare="txtfatherhusbandname" operator="NotEqual" type="String"
errormessage="Sponsor and applicant father name cannot be same" SetFocusOnError="true">
</asp:CompareValidator>
<asp:CompareValidator ForeColor="Red" Font-Size="Small" runat="server"
ID="cmpfather" controltovalidate="txtsponsorname"
controltocompare="txtfatherhusbandname" operator="NotEqual" type="String"
errormessage="Sponsor and applicant father name cannot be same" SetFocusOnError="true">
</asp:CompareValidator>
我曾经使用过代码文件编码,但问题是它必须刷新页面,所以如果有任何帮助,它会很感激。 see the picture i want to check if applicant name is not equal to either Sponsor name and sponsor father husband name and if they are equal then they show a message and focus is on applicant name
答案 0 :(得分:0)
您可以使用let homeTab = UINavigationController(rootViewController:HomePage())
self.viewControllers = [homeTab]
。您可以在CustomValidator
。
ClientValidationFunction