留言板

Alloy UI form validation tag not working

Kaushik Sahoo,修改在11 年前。

Alloy UI form validation tag not working

New Member 帖子: 3 加入日期: 12-5-18 最近的帖子
I have created a aui form, and added validation for input, but it doesn't work, Here is my code:-


<aui:form action="<%=addCustomerURL %>" method="post"> 
	<aui:input inlinefield="true" inlinelabel="left" label="Customer Name" showrequiredlabel="false" name="custName" type="text">
		<aui:validator name="required" />	
	</aui:input> 
	<aui:button type="submit" value="Add" /> 
</aui:form>


Am I doing anything wrong?
Please help.
Thanks.
thumbnail
manasa chandri,修改在11 年前。

RE: Alloy UI form validation tag not working

Regular Member 帖子: 152 加入日期: 10-9-28 最近的帖子
Hi Kaushik Sahoo,

In <aui:form > tag i did int wrote the form name and id.
example: <aui:form name="fm" id="fm" >--</aui:form>

Thanks & Regards,
Manasa.chandri.
Kaushik Sahoo,修改在11 年前。

RE: Alloy UI form validation tag not working

New Member 帖子: 3 加入日期: 12-5-18 最近的帖子
Exactly. Validation stopped working only when I added another form in an included page. When I added 'name' attribute to each forms it started working again.
asif aftab,修改在9 年前。

RE: Alloy UI form validation tag not working

Regular Member 帖子: 123 加入日期: 13-9-2 最近的帖子
In my case some time aui validation is working and some time not.
I added this line in portlet.xml, may be this is helpful.
<init-param>
<name>add-process-action-error-action</name>
<value>false</value>
</init-param>