> I was thinking of openning a bugzilla and sticking a patch up - but I don't
> want
>  to steal your thunder if you'd rather do it.

I would encourage a bugzilla ticket, it sounds like there is almost 
agreement on the needed changes, and options. Before fileing do try to firm
up those options. Since the commons validator already has the
allow2slashes,noFragments and allowAllSchemes. These would be a good start.



> 
> Niall
> 
> >
> > Adam
> >
> > On 04/01/2004 10:08 PM Niall Pemberton wrote:
> > > Adam Hardy suggested "allow2slashes", "nofragments" and
> "allowallschemes"
> > > being either true/false
> > >
> > > I think rather than having "allowallschemes", have a "schemes" parameter
> > > which can be either "all" (which sets the allow all schemes option) or a
> > > comma delimited list of valid schemes.
> > >
> > > Alternatively you could have Adam's suggestion plus any <var> that
> starts
> > > with "scheme" is taken to build an array of schemes. Something like:
> > >
> > > <field property="someUrl" depends="myUrlValidator">
> > >       <var><var-name>allow2slashes</var-name>
> > >                 <var-value>true</var-value>
> > >       </var>
> > >       <var><var-name>nofragments</var-name>
> > >                 <var-value>true</var-value>
> > >       </var>
> > >       <var><var-name>allowallschemes</var-name>
> > >                 <var-value>false</var-value>
> > >       </var>
> > >       <var><var-name>scheme1</var-name>
> > >                 <var-value>http</var-value>
> > >       </var>
> > >       <var><var-name>scheme2</var-name>
> > >                 <var-value>ftp</var-value>
> > >       </var>
> > >       <var><var-name>scheme3</var-name>
> > >                 <var-value>telnet</var-value>
> > >       </var>
> > > </field>
> > >
> > >
> > > Niall
> > >
> > > ----- Original Message ----- 
> > > From: "David Graham" <[EMAIL PROTECTED]>
> > > To: "Struts Developers List" <[EMAIL PROTECTED]>
> > > Sent: Thursday, April 01, 2004 8:17 PM
> > > Subject: Re: Fw: UrlValidator() takes options - but how?
> > >
> > >
> > >
> > >>--- Niall Pemberton <[EMAIL PROTECTED]> wrote:
> > >>
> > >>>Sorry this went to the wrong list, but anyway....
> > >>>
> > >>>Looking at CVS there is a validateUrl() method in the Struts
> FieldChecks
> > >>>class (added in version 1.15) - problem is it uses commons
> > >>>GenericValidator
> > >>>which has a static instance.
> > >>>
> > >>>What do you think about changing this to instantiate a UrlValidator if
> > >>>any
> > >>>configuration parameters have been enetered in validation.xml,
> otherwise
> > >>>use
> > >>>the GenericValidator?
> > >>
> > >>Sounds ok to me but we need to define the variable names the method
> > >>recognizes and will use in UrlValidator configuration.
> > >>
> > >>David
> >
> > -- 
> > struts 1.2 + tomcat 5.0.19 + java 1.4.2
> > Linux 2.4.20 Debian
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to