<?php
namespace App\Http\Validators;

use Illuminate\Support\Facades\Validator;

class JobRequestValidator{

    public static function validate($data){
        $validator = Validator::make($data, [
            'name'       => 'required|max:100',
            'email'      => 'required|max:191',
            'message'    => 'required',
            'file'       => 'required|mimes:pdf,docx,doc',
        ]);

        if($validator->fails()){
            return array(
                'status' => false,
                'errors' => $validator->errors()
            );
        }

        return array(
            'status' => true
        );
    }
}
