0
對於Struts 1驗證XML文件,是否可以說字段x OR字段y是必需的?Struts 1驗證字段x OR y必需
下面是我在XML文件中的語法:
<form name="/save">
<field property="email" depends="required">
<arg0 key="Email" resource="false"/>
</field>
<field property="phone" depends="required">
<arg0 key="Phone" resource="false"/>
</field>
</form>
上面的代碼需要電子郵件和電話進行填寫。我想要求電子郵件或電話。
這可能在Struts 1驗證器中嗎?我知道我可以在java代碼中做到這一點,但我很好奇它是否可以在struts 1的validation.xml文件中完成。
由於