Validating flash code
If I just return dd($validator) before the redirect.I get the error message (say if I leave the name field blank). I can manually put stuff into the session (\Session::put('key', 'value')) and I can get the key/value pair out into the web page.If the e-mail address is not in the standard format (containing "@" and "."), the validation fails, an Error Provider icon is displayed, and the event is canceled.This example requires that a Text Box and Error Provider control have been created on a form.But If I let the redirect run, I get no flash data. But if I flash the message (\Session::flash('message')) then I get no message. But when it 'redirects back' it makes 2 calls, so by the 2nd call when the page loads the flashed data is gone. I actually have a different laravel project that it all works fine on.I can run this on the form page When I submit the form and it returns back to the page. I'm not sure how to trouble shoot this or how to get my error messages. But doing (what I think is) the same thing on this project, and I can't get flashed messages to stay. The only difference I know for sure is the one it works on is laravel 5.2.14 and the new one, where it doesn't work is 5.2.31.Or, you may need two fields to have a given value only when another field is present.Adding these validation rules doesn't have to be a pain.
For example, consider an "update profile" screen that includes the user's name, e-mail address, and location.
So either there is a change between the two I i'm not taking into account.