![Picture of Gruselle Picture of Gruselle](/graphics/unknown.gif)
Gruselle - 2007-01-18 15:49:37
Hi,
I'm a newbie in PHP, and I got a problem with my form. I want users to upload DV file only. So I use that :
$form->AddInput(array(
'TYPE'=>'file',
'NAME'=>'userfile',
'ValidateOnlyOnClientSide'=>1,
'ValidateRegularExpression'=>'\.(dv|DV|Dv|dV)$',
'ValidateRegularExpressionErrorMessage'=>'Wrong file',
'ValidateAsNotEmpty'=>1,
'ValidationErrorMessage'=>'It was not specified a valid file to upload'
));
When the validation on the server side is enable, it always says that the file is wrong. It works with Javascript only but it seems to me that this validation alone is a little bit "light".
Does anyone have the same problem ? Is my regular expression incorrect ?
Thanks in advance.