How to avoid file attachments with \special characters\" in file name?"



Show first post

33 replies

Badge +11

Hi Federico,

this Regex should work:

^(.)*(..)+(.)*$

Matches any string that has at least 2 "."

After checking for special characters you can check your attachments file name again to avoid having double "." inside

Badge +8

Thanks.

Fms.

Badge +9

What do you put under client click on the submit button?

Badge +11

For using this version you shouldnt need to put anything on the client click. The name gets validated whenever you try to add an attachment.

Cheers

Philipp

Badge +3

I just received a note from another user with probably a better solution.

But I do not put anything in the Client Click field. I just have a validation rule on the form (example below) and make sure that the Submit Button does validation. This way, I also get to display a more descriptive error message.

Thanks,

Ron Pillsbury

Business Systems Analyst

Goodwill Industries of Northwest NC

2701 University Parkway, Winston-Salem NC 27105

T| 336.724.3625 x1333 C| 336.749.8009

rpillsbury@goodwillnwnc.org<mailto:rpillsbury@goodwillnwnc.org>

Badge +9

Can you post detailed steps with screen shots on what you did to achieve this?

Badge +7

Thank you for this JavaScript function. It works great except I have one issue I'm not sure how to tackle now. I have some validation rules that don't seem to be firing at all now. If I remove the JavaScript function in the button's client click setting, then my validation rules behave as expected. I'm not sure how to get both the JavaScript and the validation rules to work in harmony.

Badge
This is a very nice solution with a minor bug. Based on my tests if you edit a form with an already uploaded attachment it will fail on file.find('span')[0].innerText, because the find('span') will be null.

It should be assigned to a variable and checked by an if.

Reply