On 18/01/2008, Вячеслав Тихановский <[EMAIL PROTECTED]> wrote:
> 2008/1/18, Carl Franks <[EMAIL PROTECTED]>:
> > There's a File::MIME constraint with types() and regex() methods.
> > types() accepts either a single MIME-type, or an array-ref of MIME-types.
> > If none of these exactly match the browser-submitted Content-Type (or
> > types() wasn't set), then regex() is matched against it.
> > The regex uses the '\x' flag, so whitespace is ignored.
> >
> >     constraints:
> >       name: file
> >       type: File::MIME
> >       regex: '^ image / (?: jpeg | png ) \z'
> >
>
> I guess it should be like this? =)
>

> -        return $input =~ /$input/x;
> +        return $input =~ /$regex/x;

silly mistake...
Thanks - that's fixed in svn now!

Carl
_______________________________________________
HTML-FormFu mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to