Hi all, i have written the following code to check empty file upload in server-side validation for form field "file_0" which is an "Upload file" field:
<?php
global $mainframe;
if(JRequest::getVar('file_0')=="")
return "File upload field is required.";
?>
...but above code not working, i have also replaced if statement with JRequest::getVar('file_0')==NOFILE but it's not working also.
How can i do this?
<?php
global $mainframe;
if(JRequest::getVar('file_0')=="")
return "File upload field is required.";
?>
...but above code not working, i have also replaced if statement with JRequest::getVar('file_0')==NOFILE but it's not working also.
How can i do this?