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

Discussion in 'Java' started by shailajabtech@gmail.com, Oct 12, 2006.

  1. Guest

    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
     
    , Oct 12, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    4
    Views:
    908
    Bob Foster
    Nov 23, 2003
  2. Vivienne
    Replies:
    3
    Views:
    475
    Vivienne
    Jan 15, 2007
  3. Jake

    XML validation rule

    Jake, Aug 14, 2007, in forum: XML
    Replies:
    1
    Views:
    470
    Martin Honnen
    Aug 14, 2007
  4. Just D.
    Replies:
    0
    Views:
    549
    Just D.
    Aug 11, 2004
  5. Zam
    Replies:
    1
    Views:
    263
    Mark Schupp
    Mar 14, 2005
Loading...

Share This Page