lundi 19 mars 2018

Laravel validating. One field must be greater than another

I'm trying to do some laravel validation.

I need to ensure that the field max rent is always great than min rent and to proivded a message letting the user know.

Here is my validation code in my controller

$this->validate($request, [
        "county" => "required",
        "town" => "required",
        "type" => "required",
        "min-bedrooms" => "required",
        "max-bedrooms" => "required",
        "min-bathrooms" => "required",
        "max-bathrooms" => "required",
        "min-rent" => "required|max4",
        "max-rent" => "required|max4",
      ]);



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2HN3Zdu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire