how to add validation rule for url in the validation-rule.xml ,I added some thing like this but....

S

shailajabtech

Hi all,

I have to add validation for url.
In the validation-rule.xml i added code like this

<validator name="url"
classname="org.apache.struts.validator.FieldChecks"
method="validateUrl"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest"
depends=""
msg="errors.url"/>


for this it accepting url with this format
http://www.satyam.com/info.com only.

if i give http://www.satyam.com like this it
throwing validation error message.

so to accept second url how to define in the validation-rules.xml

pls help me.

thanks in advance.
shailajaD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top