class AvatarValidator extends AbstractImageValidator
Properties
| protected callable[] | $configuration | from AbstractValidator |
|
|
| protected array | $rules | from AbstractValidator |
|
|
| protected Validator|null | $laravelValidator | from AbstractValidator |
|
|
| protected bool | $validateMissingKeys | from AbstractValidator |
|
|
| protected string | $filename | from AbstractImageValidator |
|
Methods
No description
Throw an exception if a model is not valid.
Whether to validate missing keys or to only validate provided data keys.
No description
No description
The maximum number of pixels (width * height) allowed in an uploaded image. This bounds the memory a single decode can allocate, guarding against decompression-bomb uploads that declare huge dimensions in a tiny file. ~24 megapixels comfortably covers legitimate photos while rejecting pathological dimensions.
Details
__construct(Factory $validator, TranslatorInterface $translator, ImageManager $imageManager)
in AbstractValidator
at
line 38
void
addConfiguration(callable $callable)
void
assertValid(array $attributes)
Throw an exception if a model is not valid.
in AbstractValidator
at
line 60
AbstractValidator
validateMissingKeys(bool $validateMissingKeys = true)
Whether to validate missing keys or to only validate provided data keys.
in AbstractValidator
at
line 67
AbstractValidator
prepare(array $attributes)
in AbstractValidator
at
line 74
Validator
validator()
in AbstractValidator
at
line 79
protected array
getRules()
in AbstractValidator
at
line 84
protected array
getActiveRules(array $attributes)
in AbstractValidator
at
line 105
protected array
getMessages()
in AbstractValidator
at
line 110
protected Validator
makeValidator(array $attributes)
void
assertImageValid(string $filename, UploadedFileInterface $file)
protected void
assertFileRequired(UploadedFileInterface $file)
protected void
assertFileMimes(UploadedFileInterface $file)
protected void
assertFileSize(UploadedFileInterface $file)
protected void
raise(string $error, array $parameters = [], string|null $rule = null)
int
getMaxSize()
int
getMaxResolution()
The maximum number of pixels (width * height) allowed in an uploaded image. This bounds the memory a single decode can allocate, guarding against decompression-bomb uploads that declare huge dimensions in a tiny file. ~24 megapixels comfortably covers legitimate photos while rejecting pathological dimensions.