I'm new to Laravel and I have no idea how to perform validation checks on my data.
I have looked at this section of the Documentation.
My need is to validate different inputs I have on a search filter. For example, I have a min and max rent as text boxes. They both must have a value and also the min can't be higher than the max. How would I go about this?
I have create a request called SearchFilter with the following rules
public function rules()
{
return [
"min-rent.required" => "A minimum rent must be specified",
"max-rent.required" => "A maximum rent must be specified"
];
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2u6PS0Q
via IFTTT
Aucun commentaire:
Enregistrer un commentaire