src/Bindings/Validations.js
async function validateFile (file, options) {
  if (file instanceof File === false) {
    return null
  }

  await file.setOptions(Object.assign(file.validationOptions, options)).runValidations()
  return _.size(file.error()) ? file.error().message : null
}
async function validateFile (file, options) {
  if (file instanceof File === false) {
    return null
  }

  await file.setOptions(Object.assign(file.validationOptions, options)).runValidations()
  return _.size(file.error()) ? file.error().message : null
}
async function validateFile ( file , options ) { if ( file instanceof File === false ) { return null } await file . setOptions ( Object . assign ( file . validationOptions , options ) ) . runValidations ( ) return _ . size ( file . error ( ) ) ? file . error ( ) . message : null }
Validates a single file instance. If validation has error, then error
message will be returned as string, else null is returned.

@method validateFile

@param  {File}           file
@param  {Object}           options

@return {String|Null}
Validates a single file instance . If validation has error then error message will be returned as string else null is returned .