# Guard

trait Guard

## Methods

bool
isMimeAllowed(array $allowedMime = [])

Check if mime is allowed or not

bool
isExtensionAllowed(array $allowedExtension = [])

Check if extension is allowed or not

bool
isLimitExceeded(int|string $maxSize)

File size limit check

bool
isValid()

get upload status

void
destroyIfFailed()

Destroy uploaded file if file have invalid condition

## Details

###
at line 23
`bool isMimeAllowed(array $allowedMime = [])`

Check if mime is allowed or not

#### Parameters

array | $allowedMime |

#### Return Value

bool |

###
at line 41
`bool isExtensionAllowed(array $allowedExtension = [])`

Check if extension is allowed or not

#### Parameters

array | $allowedExtension |

#### Return Value

bool |

###
at line 58
`bool isLimitExceeded(int|string $maxSize)`

File size limit check

#### Parameters

int|string | $maxSize |

#### Return Value

bool |

###
at line 74
`bool isValid()`

get upload status

#### Return Value

bool |

###
at line 85
`void destroyIfFailed()`

Destroy uploaded file if file have invalid condition

#### Return Value

void |