Forums de discussion

<aui:validator>

Suresh Kumar, modifié il y a 11 années.

<aui:validator>

Junior Member Publications: 47 Date d'inscription: 09/05/12 Publications récentes
Hi,

How do I include <aui:validator name="alphaNumeric"/> in the following piece of code.

<aui:field-wrapper label="studyname" required="true">
<form:errors cssClass="aui-form-validator-error"
path="study.studyname" />
<aui:input disabled="<%=edit%>" name="studyname" label="" size="45" value="${study.studyname}" />
</aui:field-wrapper>

Could anyone help on this.

Thanks,
Suresh
Kiran Kumar Boyini, modifié il y a 11 années.

RE: <aui:validator>

Expert Publications: 287 Date d'inscription: 02/06/11 Publications récentes
Hi Suresh Kumar,

I do nt know where you use <aui:validator/>.

But I am using the above tag with input tag to fire validation provided by liferay .


<aui:input name="status" label="Status :" showrequiredlabel="<%= false %>" inlinefield="false">
		<aui:validator name="required" />
		</aui:input>



I hope above statement may help you...

Regards,

Kiran.
Suresh Kumar, modifié il y a 11 années.

RE: <aui:validator>

Junior Member Publications: 47 Date d'inscription: 09/05/12 Publications récentes
Kiran Kumar Boyini:
Hi Suresh Kumar,

I do nt know where you use <aui:validator/>.

But I am using the above tag with input tag to fire validation provided by liferay .


<aui:input name="status" label="Status :" showrequiredlabel="<%= false %>" inlinefield="false">
		<aui:validator name="required" />
		</aui:input>



I hope above statement may help you...

Regards,

Kiran.



Kiran,

Thanks for the reply but the required="true" is already given

<aui:field-wrapper label="studyname" required="true">
<form:errors cssClass="aui-form-validator-error"
path="study.studyname" />
<aui:input disabled="<%=edit%>" name="studyname" label="" size="45" value="${study.studyname}" />
</aui:field-wrapper>

so in this case, your statement is a duplicate and not required.

My requirement is to not allow the spaces on the studyname field. only alphabets and numbers need to be accepted without the special characters.

Do I have anything in the AUI or I need to go for the plain old javascript function to achieve it ?

Thanks in advance
Suresh
Kiran Kumar Boyini, modifié il y a 11 années.

RE: <aui:validator>

Expert Publications: 287 Date d'inscription: 02/06/11 Publications récentes
Hi follow the below link.

You may get problem will resolved.
http://rajeevalochanabr.wordpress.com/2013/01/24/aui-form-validation-using-aui-validation-tag-liberary/

Thanks,

Kiran