Is it possible to sanitize certain inputs on (or before validation)?
I have this rules for now (as example):
public function rules()
{
return [
'name' => 'required|min:3|max:255|string',
'description' => 'string',
'hours.*' => ['required', new Hours],
];
}
I want to sanitize name and description, but I don't to sanitize hours. Is this possible to do on validation, or I have to sanitize after validation and before insert?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2rBjQW6
via IFTTT
Aucun commentaire:
Enregistrer un commentaire