Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

validate

posted by mungiu 8 years ago

How i can validate a file upload field if is not an array of fields?

I must mentioned that i have several fields but they don't have array notations, i want to validate every thhis field and error atached to the error of text fields.

posted by mungiu 8 years ago

You must call fUpload::move() in each of your file fields and fUpload::validate() is automatically called.

fUpload#ValidationMoving

PS. Please, next time use a more explicit subject (you have two different posts with the same subject ;)

posted by xoan 8 years ago

tank u for u response

PS If you dont know what i'm talking about please don't respose, move ideed call validate but when i have a lot of file uploads field the message "Please upload a file" show one time even not attached for text field validate isn't enough. So you responde only to require to not put long subject. Please don't waste u time to read my post and everyting will be allright. :)

posted by mungiu 8 years ago

I did that with $validator->addFileUploadRule;

posted by mungiu 8 years ago

Your question is very vague. If you post some example code and an example of the HTML you are using, people may be able to more easily help you.

posted by wbond 8 years ago