Add form request validation tests for various client and admin requests
This commit is contained in:
@@ -38,8 +38,10 @@ class PetRequest extends FormRequest
|
||||
|
||||
public function prepareForValidation()
|
||||
{
|
||||
$this->merge([
|
||||
'weight' => PersianToEnglish::toEnglish($this->weight),
|
||||
]);
|
||||
if ($this->filled('weight')) {
|
||||
$this->merge([
|
||||
'weight' => PersianToEnglish::toEnglish($this->weight),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user