src/FeaturedImageProcessing/FeaturedImageProcessing.php
public function validateFeaturedImageUpload($featuredImageUpload) {

        // not acceptable file extension
        if (!$this->isImageFileExtensionKosher($featuredImageUpload)) {
            return "Your uploaded image file, ".$featuredImageUpload.",  is not an accepted image file type.";
        }

        // file already exists on the server
        if ($this->doesImageFileExistOnServer($featuredImageUpload)) {
            return "Your uploaded image file, ".$featuredImageUpload.", already exists on the server.";
        }

        // file upload failed
        if ( ! \Input::file('featured_image_upload')->isValid() ) {
            return "There were problems uploading your image file, ".$featuredImageUpload.".";
        }

        return "passed";
    }
public function validateFeaturedImageUpload($featuredImageUpload) {

        // not acceptable file extension
        if (!$this->isImageFileExtensionKosher($featuredImageUpload)) {
            return "Your uploaded image file, ".$featuredImageUpload.",  is not an accepted image file type.";
        }

        // file already exists on the server
        if ($this->doesImageFileExistOnServer($featuredImageUpload)) {
            return "Your uploaded image file, ".$featuredImageUpload.", already exists on the server.";
        }

        // file upload failed
        if ( ! \Input::file('featured_image_upload')->isValid() ) {
            return "There were problems uploading your image file, ".$featuredImageUpload.".";
        }

        return "passed";
    }
public function validateFeaturedImageUpload ( $ featuredImageUpload ) { // not acceptable file extension if ( ! $ this -> isImageFileExtensionKosher ( $ featuredImageUpload ) ) { return "Your uploaded image file, " . $ featuredImageUpload . ",  is not an accepted image file type." ; } // file already exists on the server if ( $ this -> doesImageFileExistOnServer ( $ featuredImageUpload ) ) { return "Your uploaded image file, " . $ featuredImageUpload . ", already exists on the server." ; } // file upload failed if ( ! \ Input :: file ( 'featured_image_upload' ) -> isValid ( ) ) { return "There were problems uploading your image file, " . $ featuredImageUpload . "." ; } return "passed" ; }
Validate the featured_image_upload field's data

@param  string   $featuredImageUpload     The featured_image_upload form field's value
@return string                           "passed", or an error message
Validate the featured_image_upload field s data