Returns a validation function to validate that a file is not null if the value is required.
Optional
Indicates if the value is required.
A custom error message to display if the value is invalid.
Returns a validation function to validate that a file is not null if the value is required.