Validating a method
To conditionally add this requirement, we can use the Laravel provides a variety of helpful validation rules; however, you may wish to specify some of your own.
One method of registering custom validation rules is using rule objects.
Sometimes you may wish to stop running validation rules on an attribute after the first validation failure.
To do so, assign the So, what if the incoming request parameters do not pass the given validation rules?
Or, you may need two fields to have a given value only when another field is present.However, if the user only changes the name field and not the e-mail field, you do not want a validation error to be thrown because the user is already the owner of the e-mail address.