Search

Heyho,

to allow some more file types than the tyes listed in the document-template I extended the regular expression this way:

/.(?:doc|docx|ppt|pptx|xls|xslx|pdf|rtf|txt|rdf|owl|zip|rar|gz|tar)$/i

When I try to save this validation rule only this part of the rule is left:

/.(?:doc|docx|ppt|pptx|xls|xslx|pdf|rtf|txt|rdf|o

Can it be that the field length is a bit to low for “complex” regular expressions?

Regards,

Andreas

Indeed the length of the validator field is 50 characters. (I don’t really see why you are limited to 49, but anyway…)

To me this is a useless limitation. We should probably bump it up to 255 characters at least.

Would you please post this finding as an issue on the bug tracker?

BTW: As an interim hack you might change the field length in the database using phpMyAdmin. I don’t expect any negative side effects.

Would you please post this finding as an issue on the bug tracker?

ok

BTW: As an interim hack you might change the field length in the database using phpMyAdmin. I don’t expect any negative side effects.

thanks :)

Heh, that’s a really odd limitation.

Thanks!

You could still optimize the expression a bit.

  • doc|docx = docx?
  • ppt|pptx = pptx?
  • xls|xlsx = xlsx?

A question mark makes the preceding item optional.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details