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
Case: Nested parameters should only be validated if the client specifies them in the request.
I have the following declared validation rules.
'regulations' => newNested(
rules: [
'is_one_time' => newBooleanType(
message: 'Property must be a boolean.',
skipOnEmpty: newWhenMissing()
)
],
skipOnEmpty: newWhenMissing()
)
Problem:
When I pass an empty body "regulations", I get a parameter validation error. This should not happen, because the parameter has a condition: "validation must be skipped if the attribute is missing", or WhenMissing.
User cases:
I, as a client, make a request with an empty body. As a result, nothing happens, I get success.
{
"service": "service",
"amount": 200
}
I, as a client, make a request with an empty "regulations". As a result, nothing happens, I get success.
Case: Nested parameters should only be validated if the client specifies them in the request.
I have the following declared validation rules.
Problem:
When I pass an empty body "regulations", I get a parameter validation error. This should not happen, because the parameter has a condition: "validation must be skipped if the attribute is missing", or
WhenMissing
.User cases:
This case does not work. Actually, I get a validation error that "is_one_time must be boolean".
Selected case is not work.
Additional info
The text was updated successfully, but these errors were encountered: