| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function validate(Request $request, Applicant $applicant) |
||
| 13 | { |
||
| 14 | |||
| 15 | $request->validate([ |
||
| 16 | 'work_samples[:template][:id][name]' => [ |
||
| 17 | 'required', // Project must have a name. |
||
| 18 | ], |
||
| 19 | 'work_samples[:template][:id][file_type_id] ' => [ |
||
| 20 | 'required', // Project type should be required. |
||
| 21 | ], |
||
| 22 | 'work_samples[:template][:id][url]' => [ |
||
| 23 | 'url:required', // The work might not be hosted online depending on the nature of it. i.e. senstiive data/international work/NDA's etc. Maybe revise the required URL rule? Consider making it nullable. |
||
| 24 | ], |
||
| 25 | 'work_samples[:template][:id][description]' => [ |
||
| 26 | 'nullable', |
||
| 27 | 'string', |
||
| 28 | 'max:4000' // Allows the applicant to be descriptive with a rather generous paragraph but not so descriptive that the hiring manager will have to contend with a page of text. |
||
| 29 | ] |
||
| 34 | } |