Skip to content

Commit

Permalink
2017-02-24 1822
Browse files Browse the repository at this point in the history
  • Loading branch information
allanmcarvalho committed Feb 24, 2017
1 parent 9f06b65 commit df29cc7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,55 +225,55 @@ There are two types of validators, one to validate information of the files call
$validator
->add('file1', 'isUnderPhpSizeLimit', [
'rule' => 'isUnderPhpSizeLimit',
'message' => 'Must have a wider width',
'message' => 'Greater than the PHP size limit',
'provider' => 'upload'
]);

$validator
->add('file1', 'isUnderFormSizeLimit', [
'rule' => 'isUnderFormSizeLimit',
'message' => 'Must have the shortest width',
'message' => 'Greater than the FORM size limit',
'provider' => 'upload'
]);

$validator
->add('file1', 'isCompletedUpload', [
'rule' => 'isCompletedUpload',
'message' => 'Must have a wider height',
'message' => 'Upload not completed',
'provider' => 'upload'
]);

$validator
->add('file1', 'isFileUpload', [
'rule' => 'isFileUpload',
'message' => 'Must have the shortest height',
'message' => 'File not uploaded',
'provider' => 'upload'
]);

$validator
->add('file1', 'isSuccessfulWrite', [
'rule' => 'isSuccessfulWrite',
'message' => 'Wrong aspect ratio',
'message' => 'Failed to write file',
'provider' => 'upload'
]);

$validator
->add('file1', 'isAboveMinSize', [
'rule' => ['isAboveMinSize', 2048],
'message' => 'Wrong image extension',
'message' => 'Does not have the minimum required size',
'provider' => 'upload'
]);
$validator
->add('file1', 'isBelowMaxSize', [
'rule' => ['isBelowMaxSize', 2048],
'message' => 'Must have the shortest height',
'rule' => ['isBelowMaxSize', 4096],
'message' => 'Exceeds the maximum size',
'provider' => 'upload'
]);

$validator
->add('file1', 'isThisMimeType', [
'rule' => ['isThisMimeType', ['image/jpeg', 'image/png']],
'message' => 'Wrong aspect ratio',
'message' => 'File is not of the correct type',
'provider' => 'upload'
]);
}
Expand Down

0 comments on commit df29cc7

Please sign in to comment.