掲示板

web form validation is not working ???

thumbnail
11年前 に chirag dashalaniya によって更新されました。

web form validation is not working ???

Regular Member 投稿: 129 参加年月日: 11/12/21 最新の投稿
I try to implement client side validation using java script ,but it is not validate form input data in web form portlet in liferay

what i do is :

First In Portlet-ext.porperties i write this line to enable java script and then restart server

validation.script.enabled true

After Web-form configuration i right simple script

== Mobile No ==

var alphaExp = /^[a-zA-Z]$/;
if(currentFieldValue.match(alphaExp)) {
return false;
}else {
return true;
}
== Email Id ==
if (currentFieldValue.indexOf("@")>=0)
return true;
else return false;

then publish,but this is can't validate from data and form successfully sended!!

help me out...
thumbnail
10年前 に Muradali Hasan によって更新されました。

RE: web form validation is not working ???

Junior Member 投稿: 84 参加年月日: 10/07/27 最新の投稿
Hi Chirag,

May be you are using form submit object which submit your form.

you can do one think change submit type to button and call java script function on onclick() after validating your data submit form through java script.

document.<formname>.submit();
10年前 に Timo Kurowski によって更新されました。

RE: web form validation is not working ???

Regular Member 投稿: 240 参加年月日: 13/06/24 最新の投稿
I have the exact same Problem. Cant change the Button tho, since its a downloaded portlet that sits on the server where i cant reach its code. (Translation is horrible, too).
10年前 に Edwin Buising によって更新されました。

RE: web form validation is not working ???

New Member 投稿: 2 参加年月日: 13/02/05 最新の投稿
I have the same issue. Any developments?
thumbnail
10年前 に Neetu Mishra によって更新されました。

RE: web form validation is not working ???

Junior Member 投稿: 75 参加年月日: 12/05/21 最新の投稿
Hi All,

Please refer the below link:
http://www.liferay.com/community/forums/-/message_boards/message/15848474


Regards,
Neetu