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
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,8 @@ $profile->getFirstName()->value(); // throws an exception on access the Undefine
108
108
109
109
##### Optional fail (only fail if the optional value is provided and invalid)
110
110
111
+
Ideal for partial data handling (e.g., requests where only specific fields, like ID, are required), allowing access to valid fields without failing on missing ones.
112
+
111
113
```php
112
114
Profile::fromScalars(id: 101, firstName: 'Alice', height: -1); // invalid provided value -> early fail
0 commit comments