I am not sure what kind of validation I should use for comments in E-commerce website that I am currently developing. It is not much I want to validate but I'm worried about security.
So what is the best practice?
My code now looks like this:
$this->validate($request, [
'comment' => 'max:1000',
]);
Is it safe to leave it like that?
It depends on your needs but I could suggest some
$this->validate($request, [
'comment' => 'required|min:3|max:1000',
]);