Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shez1983's avatar

Local & Staging server behaving differently?

I have docker environment so both local/staging are the same versions.

I have an account Settings page where you have blank password fields (one for old, one for new) they are not required so you can change other settings and click save.

On Local this works as expected (I.e. if u click save without changing anything or other settings) it succeeds

On staging this doesnt work as expected (I.e. if u click save without changing anything or other settings) it gives me an error (i.e. gets stuck by the Form Request)

Here is my form request

   'oldPassword' => [
                'nullable',
                'bail',
                'required_with:newPassword',
                new VerifyPassword()
            ],

            'newPassword' => [
                'required_with:oldPassword',
                new PasswordStrength(),
            ],```
0 likes
2 replies
Rohrig's avatar

Perhaps this could be helpful. From the docs

In some situations, you may wish to run validation checks against a field only if that field is present in the input array. To quickly accomplish this, add the sometimes rule to your rule list:

    'email' => 'sometimes|required|email',
]);```
shez1983's avatar

thanks for replying - but its weird that it works on local and not staging?

Please or to participate in this conversation.