You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour of confirmed is to simply add a copy of the field it's specified on with _confirmed appended to it in order to validate equality with the original one.
[https://laravel.com/docs/9.x/validation#rule-confirmed]https://laravel.com/docs/9.x/validation#rule-confirmed
So what happens is that given the following example of a register post request:
The behaviour of confirmed is to simply add a copy of the field
That's the problem. It's adding another field. The rules we support currently just add information about an existing field. We could theoretically support this in future, but not any time soon.
Out of curiosity, what are you using a password confirmation field in an API for? That seems like something better suited for front-ends, where the password is masked (and even there, it's an anti-pattern). In an API, you're just having someone write duplicate code.
What happened?
I'm using scribe to generate post requests for my app.
It seems that when the confirmed validator gets used it's ignored as it's un supported, according to this list here.
https://scribe.knuckles.wtf/laravel/documenting/query-body-parameters#supported-validation-rules).
The behaviour of confirmed is to simply add a copy of the field it's specified on with
_confirmed
appended to it in order to validate equality with the original one.[https://laravel.com/docs/9.x/validation#rule-confirmed]https://laravel.com/docs/9.x/validation#rule-confirmed
So what happens is that given the following example of a register post request:
Generated scribe request:
The generated request lacks the "password_confirmation" field.
My environment:
php -v
): v8.1.4composer show laravel/framework
orcomposer show laravel/lumen-framework
): v9.27.0composer show knuckleswtf/scribe
): v3.37.1My Scribe config (minus the comments): defaults
The text was updated successfully, but these errors were encountered: