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
I want to differentiate between user not supplying a property, and supplying null.
classPayload {
// Must always be providedpublicint$id;
// Can be null, or string,publicstring|null$note;
}
The source ['id' => 1] will set Payload::$note to null. But user
did not supply null as value. I want to handle this a MappingError and ask
user to supply either null or string. Is this possible somehow?
The text was updated successfully, but these errors were encountered:
I want to differentiate between user not supplying a property, and supplying
null
.The source
['id' => 1]
will setPayload::$note
tonull
. But userdid not supply
null
as value. I want to handle this a MappingError and askuser to supply either null or string. Is this possible somehow?
The text was updated successfully, but these errors were encountered: